Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Validations of the input
Message
 
 
À
06/09/2017 06:12:01
Information générale
Forum:
AngularJS
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01653867
Message ID:
01654035
Vues:
45
>Only had time for a quick look.
>
>If you use the default angular $asyncValidator then there's a built behaviour which means a resolved promise translates to valid and a rejected promise to invalid (so basically a true/false option) but I don't see how you could access any parameters passed in the resolve() or reject() (e.g. messages from server).
>
>OTOH, a role your own directive (as in the examples in my link) would allow you to display the messages.
>
>But the obvious disadvantage with the latter is that it would not have the angular behaviour of only running if all local validations have succeeded - which may or may not be a factor in your situation......
>
>
That particular field has MaxLength 100 condition. I also realized that in addition to the value I need to also pass an Id so if the value already exists for that same Id, it's OK.

It is going to be a tricky implementation.
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