Custom field + custom validation
I'd like to include a text field in my ad forms, but need to validate it's contents. Specifically, I'd like to see if it starts with one of 3 strings. (Perhaps more than 3, later on).
Say the 3 strings are '123', 'abc' and '...'.
"123456" would be valid;
"aaabc" would not be valid.
"......" Would also be valid.
Can anyone offer any suggestion on what would be the best way to approach this?
I think I can write the validation function myself, returning 1 or 0, or True or False... but where would I put it , and how would it be called?
Thanks,
AReis