Methods
(static) validateCodePostal(codePostalToValidate) → {boolean}
Returns true if the given postal code is valid
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
codePostalToValidate |
string
|
integer
|
postal code to validate. Can be a |
Returns:
- Type:
-
boolean
true or false
Example
// validate a postal code
let isValid = LuxUtils.validateCodePostal(4402); //true;
let isValid2 = LuxUtils.validateCodePostal("L-4402"); //true;
let isValid3 = LuxUtils.validateCodePostal("0404"); //false;
(static) validateFixedPhone(fixedPhoneNumber) → {boolean}
Returns true if the fixed phone number is valid
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
fixedPhoneNumber |
string
|
integer
|
fixed phone number to validate. Can be a |
Returns:
- Type:
-
boolean
true or false
Example
// validate a postal code
let isValid = LuxUtils.validateFixedPhone(420288); //true;
let isValid2 = LuxUtils.validateFixedPhone("44 12 34 22"); //true;
let isValid3 = LuxUtils.validateFixedPhone("4444"); //false;
(static) validateFixedPhone(fixedPhoneNumber) → {boolean}
Returns true if the fixed phone number is valid
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
fixedPhoneNumber |
string
|
integer
|
fixed phone number to validate. Can be a |
Returns:
- Type:
-
boolean
true or false
Example
// validate a postal code
let isValid = LuxUtils.validateFixedPhone(420288); //true;
let isValid2 = LuxUtils.validateFixedPhone("44 12 34 22"); //true;
let isValid3 = LuxUtils.validateFixedPhone("4444"); //false;
(static) validateLicensePlate(licensePlateToValidate) → {boolean}
Returns true if the given postal code is valid
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
licensePlateToValidate |
string
|
integer
|
postal code to validate. Can be a |
Returns:
- Type:
-
boolean
true or false
Example
// validate a postal code
let isValid = LuxUtils.validateLicensePlate(4402); //true;
let isValid2 = LuxUtils.validateLicensePlate("L-4402"); //true;
let isValid3 = LuxUtils.validateLicensePlate("0404"); //false;
(static) validateMatricule(matriculeToValidate) → {boolean}
Returns true if the matricule is valid
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
matriculeToValidate |
integer
|
matricule to validate |
Returns:
- Type:
-
boolean
true or false
Example
// validate a matricule
let isValid = LuxUtils.validateMatricule(1893120105732); //true;