Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#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:


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)

validation.patch (735 bytes) - added by rweisleder 9 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 9 years ago by thisconnect

Ok i've created a test case to show this: (empty a value and blur the field). This is the correct and expected result. (empty a value and blur the field). This is the wrong and not expected result.

comment:2 Changed 9 years ago by Adam Peller

Owner: set to Douglas Hays

comment:3 Changed 9 years ago by Tom Elliott

FWIW I've created a simpler demonstration of this: and

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 9 years ago by CnEY

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 9 years ago by Douglas Hays

Milestone: tbd1.6

comment:6 Changed 9 years ago by bill

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 9 years ago by Tom Elliott

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.


Changed 9 years ago by rweisleder

Attachment: validation.patch added

comment:8 Changed 9 years ago by rweisleder

The attached patch will get back the described behaviour of 1.3

comment:9 Changed 9 years ago by Douglas Hays

Milestone: 1.61.5
Status: newassigned

regression caused by [19323]

comment:10 Changed 9 years ago by Douglas Hays

Resolution: fixed
Status: assignedclosed

(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 8 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.