Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#1590 closed defect (fixed)

ValidateTextbox inhibits custom css to control appearance

Reported by: [email protected] Owned by: tk
Priority: high Milestone:
Component: Widgets Version: 0.3
Keywords: Cc: [email protected]…, [email protected]
Blocked By: Blocking:


The 'highlight' method of ValidateTextbox? sets the value of the css classname for the input element to one of dojoValidateEmpty, dojoValidateValid or dojoValidateInvalid. This overrides the behaviour of being able to set a class or className attribute in the markup to control appearance. This affects a large number of derivitive controls including all the spinner controls.

Furthermore, the dojoValidate* css classes are not defined anywhere.

It appears that an earlier behaviour was to simply adjust the background color of the input element. reverting to this would be a possibility.

Change History (8)

comment:1 Changed 16 years ago by dylan

Owner: changed from bill to tk

comment:2 Changed 16 years ago by tk

Cc: [email protected] added
Status: newassigned


Would you agree that using add/removeClass would solve this problem? I'm not sure to what extent you are modifying with a preset Class, that is why I ask.

comment:3 Changed 16 years ago by [email protected]

Thanks Karl, add/removeClass would be a good solution.

comment:4 Changed 16 years ago by Karl Tiedt

(In [5986]) References #1590 (not going to close until verified fixed with reporter)

adds updateClass() in validationTextbox that removes all validation classes and adds in the new one using add/removeClass versus setClass.

comment:5 Changed 16 years ago by tk


I updated with an add/removeClass function, its late here and I dont have an old copy of Dojo setup at this time, can you verify this fixes the problem?

If not I'll be checking it tommorow :)


comment:6 Changed 16 years ago by [email protected]


The mods you made don't compile (I tested with IE6). The problem is in the new updateClass method. It has an argument named 'class'. ECMA-262 says this is a reserved word.

I tried changing 'class' to 'cls' and all is well. Achieves the desired result wrt how we are using it.


comment:7 Changed 16 years ago by Karl Tiedt

Resolution: fixed
Status: assignedclosed

(In [5994]) Fixed reserved word class in ValidationTextbox?.js fixes #1590

comment:8 Changed 15 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.