Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#11769 closed defect (fixed)

[regression]dijit.form.ValidationTextBox - invaliMessage

Reported by: milad Owned by: Douglas Hays
Priority: high Milestone: 1.5.1
Component: Dijit - Form Version: 1.5
Keywords: Cc:
Blocked By: Blocking:

Description

hi all invalidMessage dont show in 1.5 <input type="text" name="phone" id="phone" value="someTestString" dojoType="dijit.form.ValidationTextBox?"

regExp="[\w]+" required="true" invalidMessage="Invalid Non-Space Text.">

Change History (7)

comment:1 Changed 9 years ago by Douglas Hays

Owner: set to Douglas Hays

Please describe the input that is invalid but does not trigger the invalid message.
I erased the existing text, typed abc and then a space and the invalid message was shown.

comment:2 Changed 9 years ago by milad

I erased the existing text, typed space and the invalid message was NOT shown. if put space first [with or without trim="true"] invalid message wasn't show. tnx


sorry for my poor language

comment:3 Changed 9 years ago by Douglas Hays

Milestone: tbd1.5.1

The problem is that _isEmpty() is ignoring whitespace even when trim=false (in this case) and this bug has been there back to 1.0. However, I do see the change in behavior starting with 1.5. Prior to 1.5, invalid messages would sometimes display even for partially valid input (if "abc" is valid and you have typed "ab" and haven't yet typed "c"). These extra messages allowed the above scenario to appear to be validating correctly. Now that 1.5 correctly shows/hides invalid messages, the _isEmpty/trim problem needs to be fixed.

comment:4 Changed 9 years ago by Douglas Hays

(In [22911]) Refs #11769. Make _isEmpty aware of this.trim.

comment:5 Changed 9 years ago by Douglas Hays

Resolution: fixed
Status: newclosed

(In [22912]) Fixes #11769. Backport [22911] to 1.5 branch.

comment:6 Changed 9 years ago by Douglas Hays

(In [22920]) Refs #11769. Remove debug statement.

comment:7 Changed 8 years ago by bill

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