List of Functions used for JavaScript Validation

Leave a Comment
Validation
Description of validating function.
isBlank
This JavaScript will return True if the value is whitespace, newlines, or tabs, Otherwise it will return False.

isInteger
This JavaScript Function validated a number and returns True if the value is an integer, otherwise it will return False.

isNumeric
isNumeric validates the value of any variable and return True if the value is numerical value like(1.4,-4.56, etc), otherwise it will return False.

isDigit
isDigit Function validate a single character from 0-9 and return True if the value is a single character 0-9 else it returns False.

setNullIfBlank
This setNullIf Blank JavaScript Function sets an input field’s value to empty if it only contains whitespace, newlines, or tabs.

setFieldsToUpperCase
setFieldsToUpperCase JavaScript Function sets values of input fields to their uppercase values.

disallowBlank
disallowBlank JavaScript function returns true if field is blank, alerts a message, and focuses cursor to field requiring an input. Otherwise returns false.

diasllowModify
disallowModify JavaScript Function returns true if field has been modified, alerts a message to visitor, and focuses cursor to field that was changed. Otherwise disallowModify returns false.

getInputValue
getInputValue JavaScript Function returns the value of any input element, regardless of type, getInputValue returns a comma separated list for multiple selects and multiple form fields with the same name.

setInputValue
setInputValue JavaScript Function sets the value of any input element, regardless of type.

getInputDefaultValue
getInputDefaultValue JavaScript Function returns the default value at page load time of any input element, regardless of type. getInputDefaultValue returns a comma-separated list for multiple selects and multiple form fields with same name.

isChanged
isChanged JavaScript Function returns true if the current value of a form field does not equal the value when the page was loaded.

0 comments:

Post a Comment