API - IntFilter

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

Methods

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

Parameters
Name Type Description
value * The value to be sanitized.

Returns Number: The sanitized value.

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.

Returns Boolean: If the value is valid or not.

This method will examine the cache of the filters and check if the requested filter is present. If not it will try to load this filter, when found it is added to the cache and returned. When there is an error and the filter rejects to load an error is returned.

Parameters
Name Type Description
filter String The name of the filter to get.

Returns Object: The requested filter.