User API

Validator

Other API in Package

Web

Internal Tunnel

Internal Web

Tunnel

Method Summary
ValidityCheck createCheck()

Returns an empty ValidityCheck

String getUSCardType(String cardNumber)

Returns a United States credit card type (Visa, Master Card, Discover, Amex, and Diners). Returns null if card type cannot be determined.

boolean isEmpty(String value)

Returns true if the value is null or contains only whitespace characters or empty string.

boolean isRoutingNumberValid(String routingNumber)

Validates routing transit number checksum. Input string may contain extra characters which will be ignored during validation

boolean isValidDate(String date)

Returns true if the date is a valid date.

boolean isValidDomain(String domain)

Returns true if the domain is valid. Domain should be something.dom, not https://something.com

boolean isValidEmail(String email)

Returns true if the email is a valid email address.

boolean isValidFaxNumber(String faxNumber)

Returns true if the number is a valid fax number.

boolean isValidNumber(String number)

Returns true if the number is a valid number.

boolean isValidPhone(String phoneNumber, boolean allowExtension)

Returns true if the number is a valid phone number. If allow extension is true, everything after the letter 'x' (if present) must be a number.

boolean isValidPostalCode(String countryCode, String postalCode)

Returns true if the postal code is an acceptable format for the specified country. (10/15/2009 - US support only)

boolean isValidSMS(String address)

Returns true if the address is a valid SMS address.

boolean isValidSecureUrl(String url)

Returns true if the url is valid. The URL should start with https.

boolean isValidStateCode(String stateCode, String countryCode)

Returns true if the state code is an acceptable format for the specified country. For example, 'UT' is a valid state for 'US' . (12/14/2012 - US and Canada support only)

boolean isValidUSCard(String cardNumber)

Validates a credit card issued in the United States of type Visa, Master Card, Discover, Amex, and Diners

boolean isValidUrl(String url)

Returns true if the url is valid. The URL should start with http.

boolean isValidVIN(String vin)

Returns true if string is a valid VIN (post 1981).

Method Detail


ValidityCheck createCheck()

Returns an empty ValidityCheck

Returns:  ValidityCheck

Since: 04-15-2020

top

String getUSCardType(String cardNumber)

Returns a United States credit card type (Visa, Master Card, Discover, Amex, and Diners). Returns null if card type cannot be determined.

Parameters:

  • String   cardNumber

Returns:  String

Since: 09-12-2008

top

boolean isEmpty(String value)

Returns true if the value is null or contains only whitespace characters or empty string.

Parameters:

  • String   value

Returns:  boolean

Since: 10-15-2009

top

boolean isRoutingNumberValid(String routingNumber)

Validates routing transit number checksum. Input string may contain extra characters which will be ignored during validation

Parameters:

  • String   routingNumber  - a routing number to validate. May contain extra characters. Required parameter.

Returns:  boolean

Since: 06-18-2010

top

boolean isValidDate(String date)

Returns true if the date is a valid date.

Parameters:

  • String   date

Returns:  boolean

Since: 06-28-2007

top

boolean isValidDomain(String domain)

Returns true if the domain is valid. Domain should be something.dom, not https://something.com

Parameters:

  • String   domain

Returns:  boolean

Since: 08-07-2008

top

boolean isValidEmail(String email)

Returns true if the email is a valid email address.

Parameters:

  • String   email

Returns:  boolean

Since: 06-28-2007

top

boolean isValidFaxNumber(String faxNumber)

Returns true if the number is a valid fax number.

Parameters:

  • String   faxNumber

Returns:  boolean

Since: 03-25-2009

top

boolean isValidNumber(String number)

Returns true if the number is a valid number.

Parameters:

  • String   number

Returns:  boolean

Since: 06-28-2007

top

boolean isValidPhone(String phoneNumber, boolean allowExtension)

Returns true if the number is a valid phone number. If allow extension is true, everything after the letter 'x' (if present) must be a number.

Parameters:

  • String   phoneNumber  - phone number to validate. Required parameter.
  • boolean   allowExtension  - is extension permitted.

Returns:  boolean

Since: 12-28-2011

top

boolean isValidPostalCode(String countryCode, String postalCode)

Returns true if the postal code is an acceptable format for the specified country. (10/15/2009 - US support only)

Parameters:

  • String   countryCode
  • String   postalCode

Returns:  boolean

Since: 10-15-2009

top

boolean isValidSMS(String address)

Returns true if the address is a valid SMS address.

Parameters:

  • String   address

Returns:  boolean

Since: 04-27-2009

top

boolean isValidSecureUrl(String url)

Returns true if the url is valid. The URL should start with https.

Parameters:

  • String   url

Returns:  boolean

Since: 03-30-2023

top

boolean isValidStateCode(String stateCode, String countryCode)

Returns true if the state code is an acceptable format for the specified country. For example, 'UT' is a valid state for 'US' . (12/14/2012 - US and Canada support only)

Parameters:

  • String   stateCode
  • String   countryCode

Returns:  boolean

Since: 12-14-2012

top

boolean isValidUSCard(String cardNumber)

Validates a credit card issued in the United States of type Visa, Master Card, Discover, Amex, and Diners

Parameters:

  • String   cardNumber

Returns:  boolean

Since: 09-12-2008

top

boolean isValidUrl(String url)

Returns true if the url is valid. The URL should start with http.

Parameters:

  • String   url

Returns:  boolean

Since: 03-30-2023

top

boolean isValidVIN(String vin)

Returns true if string is a valid VIN (post 1981).

Parameters:

  • String   vin

Returns:  boolean

Since: 03-08-2024

top
Copyright © 2006 - 2024, ContractPal, Inc. All rights reserved. API Date: Dec 03, 2024 10:24 AM