String Formats

String (date)

The date format in the Verifile API is YYYY-MM-DD. Dates are always string fields submitted to, and returned by, the API as strings.

Different date fields require different date accuracies. Some dates are required to be accurate to the date, others to the month and other to the year.

            
"ValidDates": [
  "2017-01-01", //Accurate to the day
  "2017-01", //Accurate to the month
  "2017" //Accurate to the year
]
            
        

String (telephone)

The following rules apply to telephone numbers in the Verifile API:

  • Maximum 30 characters
  • Minimum 2 characters
  • An optional + followed by at least 1 digit
  • Any number of digits, spaces, hyphens or brackets
  • Ending in a digit

The regex used is (^\+{0,1}[0-9]{1,})([0-9\- \(\)\.]{0,})([0-9]{1}$)

            
"ValidTelephone": [
  "+1 (212) 5555",
  "+44 (0)1234 365454",
  "01234 365454", 
  "01234 365454-12"
],
"InvalidTelephone": [
  "(212) 5555",
  "5555 (212)"
]
            
        

String (email)

The following rules apply to telephone numbers in the Verifile API:

  • Maximum 60 characters
  • Must contain 1 @ symbol
  • Must contain at least 1 period after the @ symbol
  • At least 2 characters between the @ symbol and the period
  • At least 1 character before the @ symbol

An external validation service is used to validate the domain has a valid SMTP server.

            
"ValidEmails": [
  "api@verifile.co.uk",
  "a@ab.com"
],
"InvalidEmails": [
  "@.",
  "james@verifile"
]
            
        

String (names)

The following rules apply to names in the Verifile API:

  • Maximum 60 characters
  • Minimum 2 characters
  • Any alphabetic character
  • Single spaces are allowed but not as first or last character
  • Hyphens are allowed but not as the first or last character
  • Single quotes are allowed but not as the first or last character
  • A name can have no more than 3 consecutive characters the same, irrespective of case
            
"ValidNames": [
  "John",
  "Po",
  "Vin Diesel",
  "Johnson-Thompson",
  "Aaalan"
],
"InvalidNames": [
  "Aaaalan", //4 consecutive characters
  " Sylvia", //Leading space
  "Jones-", //Trailing hyphen
  "Mou5" //Contains numeric character
]