Opened 9 years ago

Closed 4 years ago

#12018 closed enhancement (patchwelcome)

ValidationTextBox: request for validated style

Reported by: Dave Thompson Owned by:
Priority: high Milestone: 1.13
Component: Dijit - Form Version: 1.5
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

When a dijit Form is validated, invalid ValidationTextBoxes get extra error classes assigned, and a container for the error icon is added to the view.

Similar classes should be added when a ValidationTextBox passes validation, so that when a user enters a valid value, the appearance of the text box can change to indicate that the entered value was successfully validated.

Change History (7)

comment:1 Changed 9 years ago by bill

Component: GeneralDijit
Description: modified (diff)
Owner: anonymous deleted
Summary: Request for validated ValidationTextBox styleValidationTextBox: Request for validated style

I've seen this on some other apps, a green checkmark when the field is entered successfully.

So you are just asking for a new CSS class, right? dijitValidationTextBoxSuccess or something like that? Plus I guess we would have dijitValidationTextBoxIncomplete for required but empty fields, to match the three possible values of ValidationTextBox.state (as of #11970).

I'm not sure though about TextBox, that wouldn't need a CSS class for "success" too, whatever that means? I guess just that the field has a value.

comment:2 Changed 9 years ago by bill

Milestone: tbd2.0
Owner: set to Douglas Hays
Summary: ValidationTextBox: Request for validated styleValidationTextBox: request for validated style

Well, in 1.6 we have dijitTextBoxIncomplete on empty but required ValidationTextBox fields, like the "Favorite Number" field in test_validate.html. See #11970. So you could show a checkmark (or whatever) whenever the field *didn't* have dijitTextBoxIncomplete or dijitTextBoxError.

I guess for 2.0 we should change the ValidationTextBox so when the field is OK and complete, the state attribute is "Valid" rather than "", so that a dijitTextBoxValid class appears on the node.

Unless we do away with those CSS classes in 2.0 altogether and just use pseudo classes.

comment:3 Changed 9 years ago by bill

PS: not sure how to handle non-required fields, they are "valid" even when empty but it seems strange to display a "validated style" like a checkmark in that case. Maybe we need a dijitTextBoxEmpty class too.

comment:4 Changed 9 years ago by bill

Component: DijitDijit - Form

comment:5 Changed 6 years ago by Douglas Hays

Owner: Douglas Hays deleted
Status: newassigned

comment:6 Changed 6 years ago by Douglas Hays

Status: assignedopen

comment:7 Changed 4 years ago by dylan

Milestone: 2.01.12
Resolution: patchwelcome
Status: openclosed

Given that no one has shown interest in creating a patch in the past 4+ years, I'm closing this as patchwelcome.

Note: See TracTickets for help on using tickets.