Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Validations of the input
Message
 
 
À
01/09/2017 04:55:44
Information générale
Forum:
AngularJS
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01653867
Message ID:
01653918
Vues:
40
>Why return an error - I'd just return true/false.
>
>ng-change should be ok but probably a good idea to add a debounce to the model options. Ideally something like:
ng-model-options="{ updateOn: 'default blur', debounce: {'default': 1000, 'blur': 0} }"
This would perform the check after 1sec. of inactivity, or immediately when the focus is moved.

I'd like to return the message explaining where this barcode is already used (e.g. which item). Here is how I'd like the interface to look (see attached).

So, as I understand it will involve setting the error (validation). This is the part I'm not 100% sure how to implement although I did a bit of research.

https://stackoverflow.com/questions/16168355/angularjs-server-side-validation-and-client-side-forms

There was a link in that discussion I planned to follow up but was very busy with other work. May be you have examples of how to do that part.

Thanks.
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