Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tapestry Wiki" for 
change notification.

The following page has been changed by AdriaanJoubert:
http://wiki.apache.org/tapestry/Tapestry5HowToAddValidators

------------------------------------------------------------------------------
  Not done yet, as the javascript to do client-side validation is still 
required. Create a javascript file `validators.js` with e.g. {{{
  Tapestry.Validator.int = function(field, message) {
        Tapestry.addValidator(field, true, function(value, event) {
-               if (!Number(value) || value.indexOf(".")!=-1)
+               if (isNaN(Number(value)) || value.indexOf(".")!=-1)
                        event.recordError(message);
         });
  }

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to