Skip to main content

Validations v2

Understand Accelerate API data validations, ensuring data integrity. Includes field validations and regular expressions.

Tom White avatar
Written by Tom White
Updated over 6 months ago

Info: The API validates selected fields when you pass data in, to try and keep your database clean and useful! These validations are in addition to the implied validation of the datatypes, i.e. you cannot pass in an alphanumeric string into a number field, dates must be valid dates, etc. The validations are listed below, grouped by object.

Table of Validations

Object

Field

Max Length

Validation

Relationship

display_name

cannot be specified as it is generated by the system

account_manager

must be the email address of a valid Quotevine user of the account the API call is being made for

source

50

telephone_number

30

must contain only characters 0-9 and space

mobile_number

30

must be a valid UK mobile number with no additional notes

fax_number

30

must contain only characters 0-9 and space

telephone_number_2

30

must contain only characters 0-9 and space

vat_registration_number

13

Address/Contact Address

postcode

10

must be a valid UK postcode

Bank Account

bank_name

100

account_name

100

sort_code

6

account_number

12

address_line_1

50

address_line_2

50

town_city

50

postcode

10

must be a valid UK postcode

year_opened

must be between 1900 and 2100

Contact

forename

50

middle_name

100

surname

100

email_address

100

must be formatted as a valid, single email address

birth_day

must be between 1 and 31

birth_month

must be between 1 and 12

postcode

10

must be a valid UK postcode

telephone_number

30

must contain only characters 0-9 and space

mobile_number

20

must be a valid UK mobile number with no additional notes

telephone_number_2

30

must contain only characters 0-9 and space

fax_number

30

must contain only characters 0-9 and space

Opportunity

source

50

sub_source

100

description

255

tracking_field_n

1000

Proposal/Address

property

100

street

100

locality

100

town

100

postcode

8

Proposal/Contact

forename

100

middle_name

100

surname

100

email_address

255

telephone_number

20

must contain only characters +,0-9 and space

mobile_number

20

must contain only characters +,0-9 and space

job_title

100

business_telephone_number

30

Proposal/Employment

employer_name

100

position

100

address_line_1

50

address_line_2

50

town

50

postcode

8

must be a valid UK postcode

telephone_number

20

must contain only characters +,0-9 and space

employer_business

50

Note/Opportunity Note

text

must be 4000 characters or less


Regular Expressions

Info: If you're developing a front end application, these are the regular expressions that your input will be validated against.

Item

Regular Expression

Email Addresses

^([^.@]+)(\.[^.@]+)*@([^.@]+\.)+([^.@]+)$

Postcodes

^(GIR0AA)$|^((([A-PR-UWYZ]{1}([0]|[1-9]\d?))|([A-PR-UWYZ]{1}[A-HK-Y]{1}([0]|[1-9]\d?))|([A-PR-UWYZ]{1}[1-9][A-HJKPS-UW]{1})|([A-PR-UWYZ]{1}[A-HK-Y]{1}[1-9][A-Z]{1}))(\d[ABD-HJLNP-UW-Z]{2})?)$
​
​

Telephone Numbers

^[-+()oO0-9 ]{11,30}$

Mobile Numbers

^\(?(0|o|O|\+44)7[3-9][oO0-9]{2}\)?( |-)?[oO0-9]{3}( |-)?[oO0-9]{3}$



​


​

Did this answer your question?