Ok, please ignore my email requesting help,
the answer was to do this:
<contribution configuration-id="tapestry.form.validator.Validators">
<validator name="postcode" configurable="false"
class="myPackage.PostcodeValidator"/>
</contribution>
----- Original Message ----
From: Gareth <[EMAIL PROTECTED]>
To: [email protected]
Sent: Monday, 26 March, 2007 7:00:36 PM
Subject: Custom Validator - name not defined.
Hi,
I've spent the last couple of hours looking through the Gmane archives for this
forum, but to no avail.
I've created a custom validator (extending the BaseValidator class), and added
a hivemind contribution as follows:
<contribution configuration-id="tapestry.form.validator.Validators">
<validator name="validator:postcode"
class="myPackage.PostcodeValidator"/>
</contribution>
I then try to use this validator with the following line:
<component id="postcode" type="TextField">
<binding name="value" value="postcode"/>
<binding name="validators" value="validators:postcode,required"/>
</component>
Unfortunately, I receive the exception:
"No validator named 'postcode' has been defined."
This is confusing, I added the hivemodule.xml contribution as follows to start,
but then got a "validator name must be defined" error.
<contribution configuration-id="tapestry.form.validator.Validators">
<validator name="validator:postcode"
class="myPackage.PostcodeValidator"/>
</contribution>
Please tell me what should I do to successfully create and use a custom
validator in this manner?
I am using Tapestry 4.1.2
Many thanks
Gareth
___________________________________________________________
New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at
the Yahoo! Mail Championships. Plus: play games and win prizes.
http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
___________________________________________________________
What kind of emailer are you? Find out today - get a free analysis of your
email personality. Take the quiz at the Yahoo! Mail Championship.
http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]