Closed tomdye closed 5 years ago
There are two separate parts to this:
Validating on blur. The widget itself doesn't control when it validates, and I'm not sure it should. Different designers and developers have different opinions on when validation should happen, and I think it's best left fully controlled. We should probably implement this in examples, though.
Displaying an error message. This seems related to #22. It's definitely something we should implement, but it might not make it to RC.
I agree that this widget being controlled makes sense, however, I feel that the basic required
validation could be done within the widget itself in the event that the widget is set as required
, but does not have an onValidate
or similar callback passed.
It actually does receive basic required
validation without onValidate
, through the magic of native validation :)
The problem is there isn't any default or norm for when a widget should validate. Some people like it on blur, others think the browser default of onsubmit
is better. I don't think this is somewhere we should be opinionated.
This could be done as part by adding native validation to inputs
closing as outdated
Bug
As per dojo 1.x widgets, I would expect an empty blurred required field to highlight red and show a missing required field message. Currently this does not happen.