Ticket #6005 (closed enhancement: fixed)

Opened 9 months ago

Last modified 9 months ago

[cla][patch] Form.validate() will indicate errors in the form

Reported by: nathan Owned by: doughays
Priority: normal Milestone: 1.1
Component: Dijit Version: 1.1b1
Severity: minor Keywords:
Cc: bill

Description (last modified by bill) (diff)

Make Form.validate() turn all the invalid or required-but-blank fields yellow, and focus on the first invalid (or required-but-blank) field. It is a way to visually expose to the user that things aren't quite right.

Implementation notes: widget.isValid() won't be removed. widget.validate is extended to return the valid state (a boolean). Form.validate is a new method that calls widget.validate for each field - and in the event that one of them is invalid, it focuses on the first invalid.

Attachments

FormValidation.patch (1.6 kB) - added by nathan 9 months ago.
Patch which adds: 1 - dijit.form.Form.validate(), 2 - returns the boolean state from ValidationTextBox?.validate (and all subclasses), 3 - adds a testcase
FormValidation.2.patch (3.6 kB) - added by nathan 9 months ago.
Update to formValidationPatch - which contains a test case.
FormValidation.2.3.patch (2.6 kB) - added by nathan 9 months ago.
Updated patch - fixes scrolling tooltip issue and moves test case into Form.html

Change History

Changed 9 months ago by doughays

  • cc bill added
  • owner set to doughays

Needs further discussion...

Changed 9 months ago by bill

  • owner changed from doughays to nathan
  • description modified (diff)
  • summary changed from [cla][patch] Suggestion: enhance dijit.form.Form.isValid to [cla][patch] Form.validate() will indicate errors in the form

Changed 9 months ago by nathan

  • cc nathan added; nathan@… removed
  • status changed from new to assigned

Changed 9 months ago by nathan

  • cc nathan removed
  • reporter changed from guest to nathan

Changed 9 months ago by nathan

Patch which adds: 1 - dijit.form.Form.validate(), 2 - returns the boolean state from ValidationTextBox?.validate (and all subclasses), 3 - adds a testcase

Changed 9 months ago by nathan

  • owner changed from nathan to doughays
  • status changed from assigned to new

Changed 9 months ago by nathan

Update to formValidationPatch - which contains a test case.

Changed 9 months ago by nathan

Updated patch - fixes scrolling tooltip issue and moves test case into Form.html

Changed 9 months ago by doughays

  • status changed from new to closed
  • resolution set to fixed

(In [12731]) Fixes #6005. Proxy commit for nathan. Added Form.validate() method that focuses the first invalid widget found. Changed widget.validate() method to return isValid boolean.

Note: See TracTickets for help on using tickets.