The Integer filter will check if the object is an Integer or not.

Extends AbstractFilter
Defined in: lib/filter/int.js:5

Methods

sanitize (value)

Inherited from AbstractFilter but overwritten in lib/filter/int.js:24

The sanitize method will force the value to be an integer.

Parameters

Name Type Description
value * The value to be sanitized.

Returned Value

Number: The sanitized value.


validate (value)

Inherited from AbstractFilter but overwritten in lib/filter/int.js:12

The validate method will check if the value is a number or not if the value is not a number false will be returned.

Parameters

Name Type Description
value * The value to be validated.

Returned Value

Boolean: If the value is valid or not.