Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Validations of the input
Message
 
 
To
All
General information
Forum:
AngularJS
Category:
Coding, syntax & commands
Title:
Validations of the input
Miscellaneous
Thread ID:
01653867
Message ID:
01653867
Views:
53
Hi everybody,

I am wondering if anyone did server-side validations of input fields directly (e.g. not on submit). If yes, can you provide examples / point me to the good papers on the topic?

In particular, I'd like to validate barcode (or UPC) for uniqueness as the user enters it.

I wrote the following in my service
ItemService.prototype.checkCodeUniqueness = function (code) {
        var deferred = services.Deferred;

        services.Http.get(urlPath + '/checkCodeUniqueness/' + encodeURIComponent(code))
            .then(function (data) {
                deferred.resolve(data.data);
            });

        return deferred.promise;
    };
but I don't know if this is correct (e.g. how would I decode in C# and how would I implement the validations on the input).

I would appreciate suggestions / code examples.

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform