Hi Everyone,

I'm just finishing my first tapestry (sub)project!! Woohoo! What a learning experience. I'd love to go back and pull apart the code, but this project isn't mine to take home and pull apart, and I don't have time on-the-job to do it because there's the next project already in the pipeline.

I spent a little long on input validation this afternoon - I left a test value maxlength=10 in some of the input fields, where it should have been increased to something much higher.

The application had a create, edit, delete and clone objects functionality. So you could imagine, I've created some fields with >10 characters and gone to edit/clone them to a new object then found I can't save them because input validation failed!!

I found this gem on the tapestry/guide/validation.html page:

Validation constraints can also be specified in the properties file of the containing page or component. The key takes the form propertyId- validate. For example: username-validate=required,minlength=6.

It's something I'll probably look at getting used to. Is there a "global" way of configuring validation? e.g. all strings within forms will be required and they'll need to be between 5 and 10 characters. Just asking...

Is there a difference between @Validate and t:validate in the tml? Do both methods create the javascript unFocus pop up?


Cheers
Chris

Reply via email to