Members
(inner, constant) emailRegExp :Regexp
email regex returns true when a valid email string
- Source:
Type:
-
Regexp
Example
Regexp(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)
(inner, constant) phoneRegExp :Regexp
phone regex returns true when a valid phone string
- Source:
Type:
-
Regexp
Example
Regexp(/^((?:\+|00)[17](?: |\-)?|(?:\+|00)[1-9]\d{0,2}(?: |\-)?|(?:\+|00)1\-\d{3}(?: |\-)?)?(0\d|\([0-9]{3}\)|[1-9]{0,3})(?:((?: |\-)[0-9]{2}){4}|((?:[0-9]{2}){4})|((?: |\-)[0-9]{3}(?: |\-)[0-9]{4})|([0-9]{7})){1}$/gm)
Methods
(inner) isObject(item) → {boolean}
Simple object check
- Source:
Parameters:
Name | Type | Description |
---|---|---|
item |
Returns:
- Type:
-
boolean
(inner) isValidEmail(email) → {Boolean}
Regexp working for french mobile and house numbers
- Source:
Parameters:
Name | Type | Description |
---|---|---|
email |
String
|
string to be validated |
Returns:
- Type:
-
Boolean
(inner) isValidPhone(number) → {Boolean}
Regexp working for french mobile and house numbers There might be some flaws with the regexp
- Source:
Parameters:
Name | Type | Description |
---|---|---|
number |
String
|
phone number to validate |
Returns:
- Type:
-
Boolean