Re: Validation plug-ins [message #268 is a reply to message #267] |
Thu, 07 September 2006 11:28 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to previous message](/theme/default/images/down.png) |
AJM
Messages: 2361 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
Before I can activate a method on a class there are 3 things I must know:
(a) the name of the file containing the class definition
(b) the class name
(c) the method name
I can either have (a) and (b) taken care of by providing a blank custom validation class with a fixed name to which you just add your own methods, or I can allow you to create your own class(es) with your own name(s).
The first option means that all you have to supply in the data dictionary is the method name, while the second option means that you have to supply the file name, the class name and the method name.
The first option means that you can have a separate copy of the custom validation class in your own application subdirectory so that it does not clash with anything being used in any other subdirectories, but it does mean that you can only have one custom validation class per subdirectory. This would mean that merging several different classes into one class would be a manual exercise.
The second option would be more flexible as you could have a range of different methods available in a range of different classes, and you would not have to touch any code. All you would have to do is specify in the data dictionary for each field the name of the file/class/method to be used for validation.
How does that sound?
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|