Thanks for you help!

The DTOs make perfect sense.  I've a question though.

> The forms validate method
> should only perform simple input validations such as;
> make sure the field is
> not empty or that it has enough characters etc.

The knowledge of the format of a field or whether that field is
required or not is dependant on the business logic.
Consider two separate
forms at two different companies both collecting the first and last
name of a user.  At company A the first name is required but it is
optional at company B.  The requiredness of a field depends on the
business.  Both companies also have a WidgetId field input by the
user but you can be pretty sure that the format of the WidgetId at
company A is different to that of company B.  The format of the
WidgetId field is dependant on the business logic.

For these reasons, I haven't been using the validate() method of
the ActionForm or the Validator plugin which both sit at the View
level.  Instead I use the Model classes to validate all input.

Comments?
Again, thanks for you help.
Kevin.


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com
_______________________________________________
MVC-Programmers mailing list
[EMAIL PROTECTED]
http://www.netbean.net/mailman/listinfo/mvc-programmers

Reply via email to