Forums

Posting in these forums is disabled. These forums will be available for archive purposes. Please join the new forums at the links below:

  • yui-support - replaces the `YUI 3.x` and `YUI 3 Gallery` forums.
    We have created the following discussion categories within this group to aid discoverability for these most-used topics:
    • Charts for YUI Charts support.
    • DataTable for YUI DataTable support.
    • Gallery for YUI Gallery support, including support for published Gallery components as well as the Gallery process in general.
    • Tools for support of YUI’s suite of developer tools such as selleck, shifter, grover, yogi, etc.
    • Everything Else for questions that don’t fit one of the categories above, we’ve got you covered here.
  • yui-deprecated - replaces the `YUI 2.x` forum and the forums of other deprecated products (`YUI Doc`, `Builder`, `YUI PHP Loader`, etc.).
  [ 4 posts ]
New Topic | Post Reply | Print view
Previous topic | Next topic

Greg Hinch

YUI Contributor

  • Username: greghinch
  • Joined: Wed Jun 03, 2009 10:49 am
  • Posts: 74
  • Location: Fairfax, CA , USA
  • Twitter: greghinch
  • GitHub: ghinch
  • Gists: ghinch
  • IRC: gr-eg
  • Offline
  • Profile

Which validators built in?

Post Posted: Mon Nov 02, 2009 10:58 am
+0-
Please request any default validators, such as email addresses, you'd like to have available for use in the Form module.

Dav Glass

  • Username: davglass
  • Joined: Thu Aug 28, 2008 9:28 am
  • Posts: 2088
  • Location: Marion, IL, US
  • Twitter: davglass
  • GitHub: davglass
  • Gists: davglass
  • IRC: davglass
  • Offline
  • Profile

Re: Which validators built in?

Post Posted: Mon Nov 02, 2009 4:32 pm
+1-
Email Address
IP Address
Postal Code
Non-Special Characters
Telephone

How's that ;)

Viktor Rennert

YUI Contributor

  • Username: Blackshark
  • Joined: Wed Sep 09, 2009 5:18 am
  • Posts: 8
  • Location: Berlin
  • GitHub: vrennert
  • Gists: vrennert
  • IRC: Blackshark
  • Offline
  • Profile

Re: Which validators built in?

Post Posted: Mon Nov 02, 2009 5:57 pm
+0-
Can you make telephone and zip code validation based on regex patterns?
Because they are different from country to country.

nickweavers

  • Joined: Fri Jan 29, 2010 2:05 am
  • Posts: 62
  • Offline
  • Profile

Re: Which validators built in?

Post Posted: Thu Jul 05, 2012 3:06 am
+0-
Where can I find a list of builtIn validators that already exist?

If isNumber isn't already provided it would be nice to have, especially if it could deal with locale differences (France use the comma as the decimal period as well as for the thousands delimiter I believe).

The very simple check I have used is:

function validateNumericInput (val) {
if (!isNaN(parseFloat(val)) && isFinite(val) && (val > 0) && (val != '')) {
return true;
} else {
amount_to_borrow.set('error', 'Please enter a valid number > ');
return false;
}

}

But I'm finding that maybe a field event isn't triggered if a value isn't entered, so the val != '' is redundant.

How do I get Form to validate for "required" fields?

TIA,
Nick
  [ 4 posts ]
New Topic | Post Reply | Print view
Previous topic | Next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum