Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#4427 closed defect (fixed)

validation text boxes with required: true are rude

Reported by: alex Owned by: Douglas Hays
Priority: high Milestone: 1.0
Component: Dijit Version: 0.9
Keywords: 4alex Cc: alex
Blocked By: Blocking:

Description

today, validation text boxes show the error state if no default value is provided, even if the user hasn't focused them. The required attribute should show a visual indication that it is a required field (different border color? something) but not the error state. Examples with many of these inputs are glaringly user-unfriedly (like this page: http://dojotoolkit.org/~alex/anon_view/dijit/demos/form.html).

Change History (9)

comment:1 Changed 12 years ago by bill

Milestone: 1.01.1
Owner: set to Douglas Hays

ValidationTextBox? itself doesn't differentiate between those two states (empty vs. invalid), but it would be nice to.

comment:2 Changed 12 years ago by bill

Keywords: 4alex added
Owner: changed from Douglas Hays to Adam Peller

comment:3 Changed 12 years ago by Adam Peller

Owner: changed from Adam Peller to Douglas Hays

comment:4 Changed 12 years ago by bill

Milestone: 1.11.0

See http://thread.gmane.org/gmane.comp.web.dojo.devel/7588/focus=7593

Consensus so far seems to be to just have different CSS classes for required-but-blank fields vs. invalid-value-fields (with no change in behavior after a field has been accessed or after the form has been submitted). Alex said he had a slight preference for marking the field as invalid after you've touched it. Still want to get input from phiggins.

comment:5 Changed 12 years ago by bill

One more response from Peter: http://article.gmane.org/gmane.comp.web.dojo.devel/7643, bringing the tally to:

  • James: #2 (no change on blur)
  • Becky: #4 (on blur mark invalid)
  • Eugene: #2
  • Sam: #2
  • Alex: #4 (either #2 or #4 is ok, slight preference for #4)
  • Peter: #4
  • Doug: #4

comment:6 Changed 12 years ago by Douglas Hays

Status: newassigned

comment:7 Changed 12 years ago by Douglas Hays

Resolution: fixed
Status: assignedclosed

(In [10729]) Fixes #4427. Required but empty textboxes will have the normal css classes until blurred for the first time.

comment:8 Changed 12 years ago by Adam Peller

so now if I don't tab through each input in a form, is it possible I could submit to the server without enforcing require: true? Is that ok?

comment:9 Changed 12 years ago by Douglas Hays

Only the decoration is changed. isValid() still returns false.

Note: See TracTickets for help on using tickets.