Opened 11 years ago

Last modified 10 years ago

#10725 closed defect

Calling validate() on an empty but required ValidationTextBox does not trigger the correct decoration — at Initial Version

Reported by: mvaerle Owned by:
Priority: high Milestone: tbd
Component: Dijit - Form Version: 1.4.0
Keywords: Cc: Douglas Hays
Blocked By: Blocking:

Description

When leaving a required ValidationTextBox? empty calling validate() on it does return false but does not make it yellow with an icon indicating the field does not validate.

When clicking in and out of the field the decoration does appear.

When calling validate() on the form that contains the ValidationTextBox? the decoration also appears.

This can be tested with: http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/form/test_validationState.html

1) Do not touch the field after the page has loaded
2) call: dijit.byId("name").validate()
3) Returns false but field doesn't change
4) call: dijit.byId("form1").validate()
5) The field gets focus, this is by design I think because the form has only one field that doesn't validate, when I have a form with multiple fields that don't validate they do turn yellow.

Another consideration might be triggering this on calling isValid() on the form, that is what tripped me up the first time, replacing isValid() from the examples in the dijit tests with validate() would be more intuitive perhaps.

Thanks!

Change History (0)

Note: See TracTickets for help on using tickets.