Phone input

Low-code configurable 8.6

Phone inputs allow for users to enter and edit phone numbers, typically in a form. There is masking support for phone numbers with a +1 country code (USA).

Phone inputs will accept numbers only and uses built-in validation for telephone numbers. If an invalid phone number is entered, an error will be displayed when the user submits.


If the phone input field is required, you should pass the required prop. This will prevent any form submission until the required phone input is complete.


You may wish to disable an phone input field in order to prevent a user from entering or editing any information while some task is being completed, or to restrict a user's access.

Read only

If you want to render information that has already been entered for viewing purposes only, use the readOnly prop. The user will not be able to edit the phone input if it is read only.

Sometimes you may want to add some styling to a phone input field given the outcome of certain user actions. The color schemes for the following statuses can be controlled via components['form-field'] in the Theme. In Cosmos, a success status isn’t typically presented to the user because it is possible that the field will pass client-side validation but may fail when checking against server-side validation.