The ASCII filter to check the value for ASCII characters.

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

Methods

sanitize (value)

private

Inherited from AbstractFilter but overwritten in lib/filter/ascii.js:28

The sanitize method will change the ASCII values to html accepted characters.

Parameters

Name Type Description
value String The value to sanitize.

Returned Value

String: The sanitized value.


validate (value)

private

Inherited from AbstractFilter but overwritten in lib/filter/ascii.js:13

The validate method checks if there are unaccepted characters in the value. If so it resturns a false.

Parameters

Name Type Description
value * The value to validate.

Returned Value

Boolean: If there are ASCII characters in the value it will return false.