Welcome To Snipplr
Everyone's Recent 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
20308
posted 4 years ago by jlustre
Use rescue_from ActiveRecord::RecordNotUnique when DB transaction fail on uniqueness check
0
904
posted 9 years ago by yaworsk
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
1245
posted 9 years ago by geneticcode
A simple find function on an email string to identify of the string is a correctly formatted email address.
1
1201
posted 10 years ago by dreamstarter
This code demonstrates a simple way to validate IP address using preg_match() PHP function. This is a very simple code, that allows you to perform this task quickly with a minimum lines of code.
0
1040
posted 10 years ago by apphp-snippets
Simple PHP functions to validate url, email address and ip, functions will return TRUE for valid data and FALSE for invalid data.
0
1162
posted 10 years ago by codingforever99
Simple PHP functions to validate username, password and date, functions check the input format and allowed characters and then return TRUE for valid data and FALSE for invalid data.
0
3243
posted 11 years ago by codingforever99
A function to check the first two bytes to see if they match "MZ" marking it as an executable.
1
2591
posted 11 years ago by jprochazka
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
1080
posted 11 years ago by apphp-snippets
The following code allows only numeric characters to be entered.
1
868
posted 11 years ago by jprochazka
Validates Numericals in a text box.
Validates spaces in a text box.
0
1023
posted 11 years ago by laxman2021
Used to automatically give feedback on email address validity.
0
906
posted 12 years ago by boondoklife
Look if the given input could be a legal VAT-number.
Accepts input with or without '.' between the numbers and must contain a County-code
0
955
posted 12 years ago by MGHollander
Valida por medio del metodo onkeypress de un campo input, que solo se ingresen string /[a-zA-Z]/
0
963
posted 12 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
1043
posted 12 years ago by pumpkinthehead
Calling generateHash() with a single argument (the plain text password) will cause a random string to be generated and used for the salt. The resulting string consists of the salt followed by the SHA-1 hash - this is to be stored away in your databas...
3
898
posted 12 years ago by StevenW721
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
1132
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
1116
posted 13 years ago by alberomo
An additional method for the jQuery validation plugin to validate a german date (dd.mm.YYYY) based on DateITA method.
0
1228
posted 13 years ago by tuuul