helpers/index
library
Functions
-
algorithm10(String firstDigits, String verificationDigitString)
→ bool
-
Validates a number using the "modulo 10" algorithm, commonly used for Ecuadorian national ID numbers.
-
algorithm11(String initialDigits, String verificationDigitString, TypeIdentification typeIdentification)
→ bool
-
Validates a number using the "modulo 11" algorithm, used for Ecuadorian RUC numbers.
-
initValidate(String identification, TypeIdentification typeIdentification)
→ void
-
Validates a numbers used for Ecuadorian RUC or DNI numbers.
-
normalizePhone(String input)
→ String
-
Normalizes the input phone number by removing separators and unifying the
international prefix notation (
00593, 593 and +593 become +593).
-
stripPhoneSeparators(String input)
→ String
-
Removes the separators commonly used to write a phone number: spaces,
dots, dashes and parentheses.
-
validateCodeEstablishment(String codeEstablishment)
→ void
-
Validate codeEstablishment of identification number.
-
validateCodeProvince(String codeProvince)
→ void
-
Validate codeProvince of identification number.
-
validateInternationalLocalPhone(String phoneNumber)
→ String
-
Validates an Ecuadorian phone number written either in local (
0991234567)
or international (+593991234567) notation.
-
validateInternationalPhone(String phoneNumber)
→ String
-
Validates an international Ecuadorian phone number: the Ecuador country
code
+593 followed by a mobile (9…) or landline (2… to 7…) number.
-
validateLocalPhone(String phoneNumber)
→ String
-
Validates a local Ecuadorian phone number, either mobile (10 digits
starting with
09) or landline (9 digits starting with 02 to 07).
-
validateThirdDigit(String thirdDigit, TypeIdentification typeIdentification)
→ void
-
Validate third digit of identification number.