> From: Luke Majewski
> ... now I can do something boring
> like check to see if my message is "Entry is not a valid integer"
> and then just change the message myself per each invalid field,
> but I would prefer that the mask simply takes precedence over the
> auto stuff (otherwise why write the mask rule anyways?). Anybody
> seen this before?

It sounds like you are displaying the errors at the top of the form?  I
always put the error message in red directly above the field that is
invalid.  This way the message is more helpful since it is near the invalid
field instead of at the top of the page.

Take a look at the Validator sources in o.a.t.services.intake.validator.*,
especially the IntegerValidator.doAssertValidity() method -- It doesn't even
check the mask.
(http://jakarta.apache.org/turbine/turbine-2.2.1/xref/org/apache/turbine/ser
vices/intake/validator/IntegerValidator.html)

If you don't want to go with my suggestion, try writing your own Validator
using DefaultValidator.doAssertValidity() and
IntegerValidator.doAssertValidity() as templates.  Specify your home-brewed
validator class in the <field> "validator" attribute in intake.xml.

Good luck,

Chris


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to