Opened 11 years ago

Closed 11 years ago

Last modified 9 years ago

#8191 closed defect (fixed)

ValidationTextBox: update tests and doc to make promptMessage clearer

Reported by: Scott Lewis Owned by:
Priority: high Milestone: 1.4
Component: Dijit - Form Version: 1.2.1
Keywords: Cc:
Blocked By: Blocking:

Description

Not clear when the msg is displayed; it is displayed on click (appropriately) for some fields and immediately (inappropriate) for others.

Change History (6)

comment:1 Changed 11 years ago by bill

Did you really see this error on 1.2? I think it was fixed for 1.2, see #4437.

Does it happen on http://download.dojotoolkit.org/release-1.2.1/dojo-release-1.2.1/dijit/tests/form/test_validate.html ?

comment:2 Changed 11 years ago by Scott Lewis

Yes, For example, the tooltip for age appear immediately (inappropriate)

comment:3 Changed 11 years ago by bill

Component: Dijit - LnFDijit
Milestone: tbd1.4
Summary: ValidationTextBoxValidationTextBox: update tests and doc to make promptMessage clearer

Ah, this is just the way the test is set up. See the markup for the age field in test_validate.html:

<input id="q03" type="text" name="age" tabIndex=1
	dojoType="dijit.form.NumberTextBox"
	promptMessage="(optional) Enter an age between 0 and 120" ...>

promptMessage is meant to show up instantly, just like a tooltip on a toolbar button. Usually developers use the invalidMessage parameter instead, which only only appears when there's an error.

Obviously we can't remove the promptMessage parameter, at least in the 1.x timeframe, because it would break backwards compatibility, but we can update the boilerplate text in the test file to make it clear what's happening.

Could also add explanation of promptMessage to the documentation in http://docs.dojocampus.org/dijit/form/ValidationTextBox. Note that the promptMessage parameter is documented in http://api.dojotoolkit.org/jsdoc/dijit/1.2/dijit.form.ValidationTextBox although the explanation should be expanded.

comment:4 Changed 11 years ago by bill

Fixed the API documentation in [16133], and also updated the online doc at http://docs.dojocampus.org/dijit/form. Still need to update the test files to be clearer.

comment:5 Changed 11 years ago by bill

Resolution: fixed
Status: newclosed

OK, I updated the tests in [17271], so marking this as fixed.

comment:6 Changed 9 years ago by bill

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