EmailFilter
This class will check if a value is a valid email object. If not it must be sanitized.
lib/filter/email.js:5
Methods
sanitize (value)
Inherited from
AbstractFilter
but overwritten in
lib/filter/email.js:25
The sanitize method will strip any values not supported in an email address.
Parameters
Name | Type | Description |
---|---|---|
value | * | The value to sanitize. |
Returned Value
String: The sanitized email address.
validate (value)
Inherited from
AbstractFilter
but overwritten in
lib/filter/email.js:12
This validate method will check if the value given is a valid email address.
Parameters
Name | Type | Description |
---|---|---|
value | * | The value to validate. |
Returned Value
Boolean: True if the value is a correct email address, false otherwise.