Skip to main content

Phone number field

Log in to add to favourites

The phone number field allows you to store contact details within entries. It provides an easy way to capture phone numbers for various purposes, such as following up on orders, event registrations, or job applications.

Appearance

Settings

Setting nameSummary
NameA text label to identify the field in an entry.
Field IDA sanitised name to be used by the API.
Default valueThe default value property sets the default content for a field when an entry is created.
Read onlyPrevents authors from editing the field in the entry editor.

Supported validation

This field editor supports the following validation methods:

Custom pattern matching validation

If you want to validate the number that the author is entering matches a particular format, you can use a Matches pattern validation on the field to ensure the value is in the format you expect. We've provided some examples below to get you started.

UK Phone number

^(?:+44\s?\d{4}\s\d{6}|0\d{4}\s\d{6})$

This pattern will allow the following UK formats:

  • 01233 123456
  • 07739 123456
  • +44 7739 123456

US Phone number

If you want to capture a US telephone number you can use the following regular expression:

(^(1?)(\s?)([\s]?)(((\d{3}))|(\d{3}))([\s]?)([\s-]?)(\d{3})([\s-]?)(\d{4})+$)

  • 555-555-5555
  • (555)555-5555
  • (555) 555-5555
  • 555 555 5555
  • 1 555 555 5555
  • 800-692-7753
  • 6505552368

Properties

Property nameSummary
Placeholder textThe placeholder property provides a short hint describing the expected value of a field.
Content guidelinesProvides guidance to an author for the expected content the field should contain.
Field visibilityDetermines if the field should be displayed in the collapsed state when opening the entry editor.

Still need help?

If you still need help after reading this article, don't hesitate to reach out to the Contensis community on Slack or raise a support ticket to get help from our team.
New support request