function length Define(inputtext, min, max) // Function that checks whether a option is selected from the selector and if it's not it displays an alert message.
function true Selection(inputtext, alert Msg) // Function that checks whether an user entered valid email address or not and displays alert message on wrong email address format.
It happens sometimes, when user forgets to choose option from the select feild.
In that case, the form should convey about issue so that user can take the action.
Add a PHP action and write the code needed to do the validation you desire, then return some value, say "true" or "false" based on the codition success.Regular expression helps you in pattern matching in string. : Matches any single charcter except a new line : Matches the preceding character or repeated character. The basic expression for matching entered value as number in the field is: /^[0-9] $/. [A-Z] : It matches characters from uppercase ‘A’ to lowercase ‘Z’. The codes for checking form empty fields are given below: There is an expression that checks whether the string contains only alphabets or not.] @[a-z A-Z0-9.] .[a-z A-Z0-9]$/ The expression checks the letters, numbers, and other symbol at a proper sequence.The sequence is defined as: [alphabets/numbers/underscore/plus [email protected]/numbers/periods.domain name] If the entered email address is not in a proper sequence, then the message will popup which says “Wrong Email Address”.
So, just to make sure that user entered the email address in the correct format, it’s necessary to include email validation code inside the validation codes.