url
The url property is used to define a valid URL value.
NOTE: for URLs to be valid, they are required to have a protocol (e.g. https://) and a domain (e.g. example.com).
import { atom, url } from '@iridiumcms/core';
export const sample = atom('sample', {
myUrl: url(),
});
Configuration
The url field takes an optional configuration object with the following properties:
- defaultValueThe default value of the field. Defaults to
stringundefined. - displayNameThe display name of the field. Defaults to the name of the property.
string - requiredWhether the field is required. Defaults to
booleanfalse. - searchableWhether the field is searchable. Defaults to
booleanfalse. - filterableAllows filtering the field. Defaults to
booleanfalse. - layoutThe layout of the field in the admin. Defaults to
LAYOUTLAYOUT.full.
