| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Validator

Page history last edited by PBworks 17 years, 11 months ago


 

Validator

(extends Object)


Object Summary

 

This object is basically used for form validation. For example it can be used to enforce the user enter a valid e-mail address in the form.

 

The object is also used to validate data formats of various objects throughout s@rdalya's source code.


Constructor

This object has no constructor. It is accessed statically.


Methods

 

Validator.isDefined(x)

 

parameters

x - The parameter to test.

 

returns

true if x is defined, false otherwise.

 

comments

Checks whether or not x is defined.


Validator.isEmpty(x)

 

parameters

x - The parameter to test.

 

returns

true if x is an empty String, false if it is null, numeric or undefined.

 

comments

Checks whether or not x is an empty String.


Validator.isEmail(x)

 

parameters

x - The parameter to test.

 

returns

true if x is a valid e-mail address, false otherwise.

 

comments

Checks wheter or not x denotes a valid e-mail address.


Validator.isWhiteSpace(x)

 

parameters

x - The parameter to test.

 

returns

true if x does not include any non-whitespace character, false otherwise.

 

comments

Checks whether or not x is a whitespace String.


Validator.isInteger(x)

 

parameters

x - The parameter to test.

 

returns

true if x represents a valid integer, false otherwise.

 

comments

Checks whether or not x denotes an integer.


Validator.isFloat(x)

 

parameters

x - The parameter to test.

 

returns

true if x represents a valid float, false otherwise.

 

comments

Checks whether or not x denotes a float.


Validator.isNumeric(x)

 

parameters

x - The parameter to test.

 

returns

true if x represents a valid numeric value, false otherwise.

 

comments

Checks whether or not x denotes a numeric value.


Validator.isString(x)

 

parameters

x - The parameter to test.

 

returns

true if x is an instance of String, false otherwise.

 

comments

Checks whether or not x is a String.


Validator.isDate(intYear,intMonth,intDay)

 

parameters

intYear - The year.

intMonth - The month.

intDay - The day.

 

returns

true if intYear-intMonth-intDay represent a valid Date, false otherwise.

 

comments

Checks the validity of a Date.


Validator.isPositive(x)

 

parameters

x - The parameter to test.

 

returns

true if x represents a positive entity or zero, false otherwise.

 

comments

Checks whether or not x is a positive entity.


Validator.isPositiveStrict(x)

 

parameters

x - The parameter to test.

 

returns

true if x represent a strictly positive entity (zero not allowed), false otherwise.

 

comments

Checks whether or not x is a strictly positive entity.


Validator.isNegative(x)

 

parameters

x - The parameter to test.

 

returns

true, if x is a negative entity or zero, false otherwise.

 

comments

Checks whether or not x is a negative entity.


Validator.isNegativeStrict(x)

 

parameters

x - The parameter to test.

 

returns

true if x is a strictly negative entity (zero not allowed), false otherwise.

 

comments

Checks whether or not x is a strictly negative entity.


Validator.validateMarkup(strLocation)

 

parameters

strLocation - The URL to validate.

 

comments

Opens a new window and validates markup of strLocation.


Validator.validateCSS(strLocation)

 

parameters

strLocation - The URL to validate.

 

comments

Opens a new window and validates the CSS of strLocation.


Validator.isDOMEnabled()

 

returns

true if the browser fully supports DOM.

 

comments

Checks whether the browser fully supports DOM.


Validator.isAJAXEnabled()

 

returns

true if the browser supports AJAX.

 

comments

Checks whether the browser supports AJAX.


See Also

 

None given.


Usage Examples

 

Comments (0)

You don't have permission to comment on this page.