thank you, sound like exactly what I needed - I thought about putting the error next to the invalid field and I might still do that - but I think the way that my form is setup I would prefer it at the top... Thanks again Chris!
Luke ----- Original Message ----- From: "Chris K Chew" <[EMAIL PROTECTED]> To: "Turbine Users List" <[EMAIL PROTECTED]> Sent: Saturday, March 29, 2003 10:45 PM Subject: RE: intake validate > > 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] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
