Title: Message
Just create an instance of your FieldValidator and pass it a test object with a field of the correct name to validate... you'll need to set some values in like the field name and a ValidatorContext, which is just an error message container.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 1:26 PM
To: [EMAIL PROTECTED]
Subject: [OS-webwork] Testing validators?

Hi everyone! :)

I'm building some custom FieldValidators. If you want some mostly useless bit of culture, this is one that validates CPFs, one of the id's that every brazilian has to walk around with. This id is always numeric, and has some consistency check-digits at the end.

I'm pretty sure the logic behind the field validator is ok, but I'm not sure how to test it. I took at look at the sources, and there are mock configurations, but I couldn't really figure out what to do with them (Required*ValidatorTest don't show me much). Any hints?

peace,
-cv

Reply via email to