Welcome To Snipplr
Everyone's Recent JavaScript Snippets Tagged validation
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
This is used to validate a date in a specific format. The code example is to validate whether it is a valid dd/MM/yyyy Date Format.
1
22129
posted 5 years ago by jlustre
With publicly available information and a little math it is possible to not only validate a given card number, but to determine the financial institution that issued the card, the type of industry the issuer belongs to, the actual account number and...
0
1377
posted 10 years ago by geneticcode
One of the important things about user input is to verify that the user has supplied the email that you have requested. The function below allows you to verify email address with easy.
1
1197
posted 12 years ago by apphp-snippets
The following code allows only numeric characters to be entered.
1
979
posted 12 years ago by jprochazka
Valida por medio del metodo onkeypress de un campo input, que solo se ingresen string /[a-zA-Z]/
0
1087
posted 13 years ago by serialk89
Find the date with or without a year and with double or single digit month or day. Easily extendable to other date delimiters and formats.
0
1178
posted 13 years ago by pumpkinthehead
Check if user has intruded a real email address. Return true (real email) or false (fake email).
Arguments: Element from a form.
From book Dom Scripting by Jeremy Keith
0
1253
posted 13 years ago by alberomo
Arguments: Element from a form.
Take that element and checks if is filled. If not, returns false. If is filled, returns true.
From book Dom Scripting by Jeremy Keith
0
1233
posted 13 years ago by alberomo
Often you supply a default value in a text field which you want to automatically clear when the user enters the field. This will do that operation and fill the field with a default value.
0
916
posted 14 years ago by jimbo
This tiny jQuery plug in forces a user to enter only numeric values on an input field by silently removing non-numeric values as they're entered. (Caution: Never rely on client-side validation; use server-side validation as well)
2
1304
posted 14 years ago by BrunoDeBarros
The following JavaScript will validate an email address using strict rules when a form is submitted.
0
962
posted 14 years ago by jprochazka
The following JavaScript will validate if a 10 digit phone number was supplied once the form is submitted.
0
781
posted 14 years ago by jprochazka
requires that a pulldown \\\"program1\\\" in form \\\"freshmen\\\" be set to anything but the first value in the option list. \\r\\n\\r\\nrequires jquery validate: http://docs.jquery.com/Plugins/Validation
1
940
posted 14 years ago by dan_hoerr
Fixes an issue if you have another login form on the page with a password field.
0
1163
posted 14 years ago by linusx
Use /* <![CDATA[ */ to make validators ignore the javascript code.
0
1216
posted 15 years ago by jaff
Just thought id put up a version of my form validation class. It will be expanded in the future but I thought Id let everyone have a look.
# Update 0.1 #
* Create Error List Function
* Validate Email Address Function
* Valida...
0
1063
posted 15 years ago by alvincrespo
JavaScritp Form Validation Framework to validate form fields on the fly, no programming knowledge required.
0
837
posted 16 years ago by clickfind
Validating a decimal such as a measurement of time or currency (10.5 or 0.4). This function will return the correct number. If you feed in "10.5foo" the function will spit back 10.5. If you feed in "bar" the function will return nothing.
0
781
posted 16 years ago by blackf0rk