JavaScript Validations, JavaScript Tutorial, Global Guide Line Technology.
Bookmark Bookmark: JavaScript Validations, JavaScript Tutorial Forum | Blog |

      Home                    

Basic JavaScript Guide.
 JScript Introduction.            
 JScript Why?                       
 JScript Recognitions.          
 JScript onMouseover.         
 JScript with Buttons.           
 JScript Alerts.                     
 JScript Variables.               
 JScript Operators.               
 JScript Functions.               
 JScript Prompts.                 
 JScript Conditions.             
 JScript Validations.
 JScript Confirmation Boxes.
 JScript Browser Detection.  
 JScript Redirection.            
 JScript on Links.                 
 JScript Switch.                    
 JScript Loops.                     
 JScript Events.                    
 JScript Exception Handling.
 JScript Reserve Characters. 
 JScript with Objects.            
 JScript Math Object.           
 JScript using Dates.             
 JScript using String.            
 JScript using Arrays.            
 JScript Operations.              
 JScript Handling Cookies.   
 JScript in Mapping.             
 JScript Time Out.                
 JScript Summary.                

JavaScript Tutorial >> Validations in JavaScript.


     Back             Next     


What is JavaScript Validations?

Now we will learn here in JavaScript Tutorial that using of client side JavaScript is an efficient way to validate the user input in web applications. When there are many fields in the form, the JavaScript validation becomes too complex.

A person might think it easy to find a complete radio & checkbox client-side validation JavaScript on the web. It would however be our opinion that such a person would be mistaken. We searched and searched for a JavaScript We could plug and play, so to speak. The reality was, it simply did not exist. Here we define some common live JavaScript validation or what some might call inline error messages to explain more.

These are reusable JavaScript functions for common validations, here you will learn the list of built-in JavaScript functions to make any kind of Validations in JavaScript.
It includes things like checking if a value is a number, integer, blank, and so on...
It also has generic routines for getting and setting the value of any type of input field, as well as checking if the value has changed.

Functions used for JavaScript Validations

Function for JavaScript Validation Description of validating function.
isBlank This JavaScript will return True if the value is whitespace, newlines, or tabs. Otherwise it will return False.
Test Example of Is Blank in JavaScript.
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 idDigit 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 setNullIfBlank 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.
disallowModify 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 the 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.

     Back             Next     
 

JavaScript If Else and Switch Statements Examples



Examples of JavaScript Select and Option Objects



Form Object and Form Elements Examples



[ About ] [ Contact ] [ Home ]
[ Links ] [ Site Map ] [ Services ] [ Privacy ]

Copyright 2005 -  2018 www.globalguideline.com All rights reserved. (Best viewed in IE 6.0+ or Firefox 2.0+ at 1024 * 768 or higher) 189 visitors are online now