Validate

Created by Dariusz Szczendzina, Modified on Wed, 12 Jul, 2023 at 11:08 AM by Dariusz Szczendzina

Validate allows you to validate Email Addresses, Postcodes, URL's, Telephone Numbers and dates to check they are syntactically correct.


Date Time

Input one or more dates alongside a desired format and identify whether or not they are valid by scoring them TRUE or FALSE. e.g.

Date TimeFormatOutput
01-01-2020dd-MM-yyyyTRUE
40-01-2020dd-MM-yyyyFALSE
01-20-2020dd-MM-yyyyFALSE

Email

Input one or more Email Addresses and identify whether or not they are valid by scoring them TRUE or FALSE. e.g.

EmailOutput
example@example.comTRUE
example@@example.comFALSE
example@example..comFALSE

Postcode

Input one or more Postcodes alongside their respective country identifiers and identify whether or not they are valid by scoring them TRUE or FALSE. e.g.

PostcodeCountry Identifier - ISO 2Output
PO13 9FUGBTRUE
PO.13 9F.UGBFALSE
P-O-1-3-9-F-UGBFALSE

Telephone

Input one or more Telephone Numbers alongside their respective country identifiers and identify whether or not they are valid by scoring them TRUE or FALSE. e.g.

TelephoneCountry Identifier - ISO 2Output
07511111111GBTRUE
0751111111GBFALSE
075111111111GBFALSE

URL Address

Input one or more URL Addresses and identify whether or not they are valid by scoring them TRUE or FALSE. e.g.

URL AddressOutput
microsoft.comTRUE
microsoft,,comFALSE
microsoft.,comFALSE

NOTE: When entering a Domain in the input field, make sure it does not have a path attached to it e.g. 'microsoft.com' not 'microsoft.com/page'.


Custom Functions

DQ.VALIDATE_EMAIL

The DQ.VALIDATE_EMAIL function validates an email.

Parameters:

email (string), email to be validated

returns (boolean), true if valid

DQ.VALIDATE_POSTCODE

The DQ.VALIDATE_POSTCODE function validates a postcode.

Parameters:

postcode (string), postcode to be validated

country (string), country identifier, preferred format is ISO2, otherwise the service will attempt to derive country from the input

returns (boolean), true if valid

DQ.VALIDATE_URL_ADDRESS

The DQ.VALIDATE_URL_ADDRESS function validates a URL address.

Parameters:

url (string)URL to be validated

returns (boolean), true if valid

DQ.VALIDATE_TELEPHONE

The DQ.VALIDATE_TELEPHONE function validates a telephone number.

Parameters:

telephone (string), telephone to be validated

country (string), country identifier, preferred format is ISO2, otherwise the service will attempt to derive country from the input

returns (boolean), true if valid

DQ.VALIDATE_DATETIME

The DQ.VALIDATE_DATETIME function validates a datetime in a given format.

Parameters:

datetime (string), datetime to be validated

format (string), format of datetime, from list:

  • yy-MM-dd
  • yyyy-MM-dd
  • yy-dd-MM
  • yyyy-dd-MM
  • yy-MM-dd hh:mm:ss
  • yyyy-MM-dd hh:mm:ss
  • yy-dd-MM hh:mm:ss
  • yyyy-dd-MM hh:mm:ss
  • dd-MM-yy
  • dd-MM-yyyy
  • MM-dd-yy
  • MM-dd-yyyy
  • dd-MM-yy hh:mm:ss
  • dd-MM-yyyy hh:mm:ss
  • MM-dd-yy hh:mm:ss
  • MM-dd-yyyy hh:mm:ss
  • hh:mm
  • hh:mm:ss
  • hh:mm:ss:fff
  • yyyy-MM-dd-Thh:mm:ssZ
  • yyyy-MM-dd hh:mm:ss:fff

returns (boolean), true if valid

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article