#3165 closed defect (fixed)
dijit.form.ValidationTextbox clears the illegal value when it loses a focus
Reported by: | Eugene Lazutkin | Owned by: | Douglas Hays |
---|---|---|---|
Priority: | high | Milestone: | 0.9beta |
Component: | Dijit - Form | Version: | 0.9 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
dijit.form.ValidationTextbox
replaces an illegal value with an empty string, if it loses a focus. Please note that the empty string is not always a valid choice for a field. It could be reproduced with the existing test_validate.html
page.
The correct behavior is: it should leave it there (and retain the "error" class) giving user a chance to correct it later, because it could be mistyped, and a lot of users do not look at the screen while typing. Instead of removing an extra character or correcting a similar simple typo, user is forced to retype the field completely.
At the very least this behavior should be easily customizable by subclassing a widget.
Change History (2)
comment:1 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 10 years ago by
Component: | Dijit → Dijit - Form |
---|
(In [8823]) Fixes #3165. Added optional displayedText parameter to Textbox:setValue so that the true value and dispayed value can be set with 1 call and kept in sync. Also, the displayed value is not changed if format() returns an error. Changed Select to use this new feature since its setValue calls are asynchronous.