Closed jrief closed 7 years ago
Well, I agree emailField or UrlField can be quite boring stating it's invalid until we're done typping it. I think it could be a good small improvement. :+1:
Now that all our community has answered (haha), do you still consider doing it? A workaround could also be to add the following to the fields when needed (from angular doc):
ng-model-options="{ updateOn: 'default blur', debounce: { default: 500, blur: 0 } }"
ups, I already use ng-model-options
for my production sites.
But anyway, adding support for $touched
and $untouched
would be a good idea. Hopefully, one of my customers insists on this, to have an incentive for doing it.
This is just a proposal, and I'd like to ask the django-angular community about their opinion.
In form validation, shall we use
$touched
instead of$dirty
?Currently the behavior like this: Whenever one starts to type into a field, for instance an email address field, which yet does not validate, then after the first character, an error message appears. If we would replace
$dirty
by$touched
this error message would only appear, whenever the field is blurred and the address still invalid.However, for upstream error messages we still must use
$pristine
instead of$untouched
, so that those messages disappear whenever one starts to type.What's your opinion about this?