Hi everyone,
I am wondering how you would go about building a validator that could be a function? the validator would return a array called error['...'] (where ... is, is the name of the field it validated so if there was a error say for email it would be error['email'] and it would have also the error msg with then that array
my idea is that the validator would grab get looped through a array of all the form fields for the form that its displaying, and at the same time it would find out if that field is a required field, if its not and there is imput then it would validate it and if its required it would make sure there is data in the field and validate it once the validator has gone through all of the array then it would have the same form display again if there was errors and if not then it would process the form for safe keeping.
Any ideas or feed back on the way i think this should work?
Thanks for the input!
Sincerely,
Christopher