diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2017-08-03 16:42:01 +0200 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2017-08-03 16:42:01 +0200 |
commit | 196c9bab6aaf91e30a6e275b84d21d0c9869306c (patch) | |
tree | a190820c55cf60426c626ad3e64166ce2c304d21 /starmath/sdi | |
parent | add a few const purely for documentation reasons (diff) | |
download | core-private/lmamane/validation.tar.gz core-private/lmamane/validation.zip |
form controls: validate *before* propagating value, but only on commit
private/lmamane/validation
*Before* propagating, because after it is propagated it is too late!
Only on commit (unless the control is not commitable), because
validating each time the control value changes leads to a validator
being called each time the user enters a character of the value.
So each validator necessarily has to accept any prefix of a valid
value, which often defeats the purpose. E.g. one cannot do a valiator
that enforces a minimum length, or minimum password complexity.
So validating on commit makes much more sense. That's when the user
is trying to actually set the value as a complete value.
Change-Id: Id3142367bacd81e07d093c8bee97d518df28cafe
Diffstat (limited to 'starmath/sdi')
0 files changed, 0 insertions, 0 deletions