Hi Ian,
the code itself should be simple enough.
as to embed point, put it in the
validateValue::fieldname routine
have a look at the generated code as to what to do if the validation fails.
(setting the field to say "required" will generate some sample validation code for you.)
cheers
Bruce