Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Validations of the input
Message
 
 
À
31/08/2017 03:55:49
Information générale
Forum:
AngularJS
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01653867
Message ID:
01653892
Vues:
47
>Not sure what you actually want to check, 'uniqueness' implies checking that it's not already stored, 'validity' suggests you just want to check the length and checksum? The latter could easily be done with client side javascript.
>Also no clear where/when you are calling checkCodeUniqueness() ?

Hi Viv,

I'd like to perform a server side check against 3 tables for uniqueness as soon as user enters a barcode. If the value has been already used, present a validation error message in the form.

So, my idea was to run this code from, say, ng-change (or should it be another event)? I need some samples of assigning custom error messages and presenting it in the front-end.

Right now the service call I wrote is not even hooked up to the API call, but this should not be a problem, I can write the necessary API/Adapter/Repository calls rather quickly. It's the front-end where I'd like to see some samples of the logic I'll implement.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform