Value to check; anything that is not a non-empty string fails.
See ValidatorOptions.
{ valid, error }; error is null when valid.
GeoLeaf.Validators.validatePhone("+33 6 12 34 56 78");
// Returns: { valid: true, error: null }
GeoLeaf.Validators.validatePhone("06-12-34-56-78");
// Returns: { valid: true, error: null }
// Trop peu de chiffres
GeoLeaf.Validators.validatePhone("123");
// Returns: { valid: false, error: 'Phone number must contain at least 10 digits' }
Validates a phone number by shape and digit count.
Two successive checks: the string may only contain digits, spaces,
+,-,(and); and once every non-digit is stripped, at least 10 digits must remain. Formatting is therefore free —"+33 6 12 34 56 78"and"06-12-34-56-78"both pass.⚠️ No country-specific rule is applied: a 10-digit sequence passes regardless of whether it could be dialled.