PhoneNumberValidationType

object PhoneNumberValidationType : EasyFormsValidationType

Phone validation using below criteria:

  • Number must contain at least 7 digits.

  • Number must contain at most 19 digits.

  • Number can start with +.

  • Number can contains whitespaces in between.

  • Number can contains () as second part of the number.

  • Number can contains - as a separator.

Functions

isValid
Link copied to clipboard
open fun isValid(value: String): Boolean
Opened so it can be overridden to suits your validation needs.

Properties

maxLength
Link copied to clipboard
open val maxLength: Int
defines a text should have a maximum set of chars.
minLength
Link copied to clipboard
open val minLength: Int
defines a text should have a minimum set of chars.
regex
Link copied to clipboard
open val regex: String? = null
the regex to be used to validate the text if any.

Sources

androidJvm source
Link copied to clipboard