#10869 closed defect (fixed)
ValidationTextBox: required tooltip doesn't display anymore
Reported by: | thisconnect | Owned by: | Douglas Hays |
---|---|---|---|
Priority: | high | Milestone: | 1.5 |
Component: | Dijit - Form | Version: | 1.4.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Hey guys,
I just noticed starting from 1.4.0 you guys dropped the feature to display a tooltip when setting a field to required. In 1.3.2 when you leave a field empty and focus that field a tooltip will be displayed telling the user the value is required.
If i want to achieve this now i have to set the invalidmessage. I would like to know the reason for this or is just a bug? Its really annoying i need 1.4.0+ for the enhanced data grid but it also breaks how my application works.
Thanks for your feedback
Attachments (1)
Change History (12)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Owner: | set to Douglas Hays |
---|
comment:3 Changed 12 years ago by
FWIW I've created a simpler demonstration of this:
http://telliott.net/dojoExamples/dojo-validation1_4.html and http://telliott.net/dojoExamples/dojo-validation1_3.html
The user field behaves the same in both 1.3 and 1.4 (has a invalid message and prompt message. The prompt message is shown rather than the invalid).
But the password field only has an invalid message, and this doesn't display on 1.4.
comment:4 Changed 12 years ago by
It looks as if the difference in behavior is caused by the addition of line 143 (in the validate method of ValidationTextBox?):
if(isEmpty){ this._maskValidSubsetError = true; }
This causes the comparison on line 152 to fail, which means the message never falls back to invalidMessage if promptMessage isn't set, in the case where a validation field is empty but required.
I am unsure as to the reason for line 143 being added. Perhaps it should also be checking for !this.required ?
comment:5 Changed 12 years ago by
Milestone: | tbd → 1.6 |
---|
comment:6 Changed 12 years ago by
Summary: | Form validation backward compatible? → ValidationTextBox: required tooltip doesn't display anymore |
---|
So it's not supposed to display a tooltip the first time you focus the form field, but it should display a tooltip after you blur the field, and then come back to it (ie, refocus it). I take it that's not happening?
comment:7 Changed 12 years ago by
Hi Bill. No, it's not happening.
Additionally I've tried calling form.validate() with just a single invalid input. Under both 1.3 and 1.4 the first invalid input seems to get the focus after calling validate. However in 1.3 you get the tooltip at that point as well, in 1.4 you do not.
Tom
Changed 12 years ago by
Attachment: | validation.patch added |
---|
comment:9 Changed 12 years ago by
Milestone: | 1.6 → 1.5 |
---|---|
Status: | new → assigned |
regression caused by [19323]
comment:10 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [21846]) Fixes #10869. Add this.missingMessage to ValidationTextBox? that was already in the NLS files. Refocusing an empty/required textbox will display the new error. Added automated message test file.
comment:11 Changed 11 years ago by
Component: | Dijit → Dijit - Form |
---|
Ok i've created a test case to show this:
http://beta.geboortelijst.be/testcase/login1.3.2.html (empty a value and blur the field). This is the correct and expected result. http://beta.geboortelijst.be/testcase/login1.4.2.html (empty a value and blur the field). This is the wrong and not expected result.