Special string: url, redirect, email, phone
Special string types.
Purpose: words or continuous sequences of words of a given format:
- url - latin characters and numbers without spaces, as well as the '-' symbol ('_' is not used)
- redirect - absolute http and https links
- email - address like name@domain.zone
- phone - numbers, spaces, symbols (, ), + and -
The url type field has a translit_from parameter for automatic generation of a value based on another field (usually a name). The name of the field from which the string will be taken for transliteration is set as the value of the option. After setting this option, a special icon will appear opposite this field in the admin panel, when clicked, the field will be automatically filled in.
Field type in SQL table: char and varchar
Examples:
['Link', 'url', 'url', ['unique' => true, 'translit_from' => 'name']]
['Redirect', 'redirect', 'redirect']
['Email', 'email', 'email', ['required' => true, 'unique' => true]]
['Client phone', 'phone', 'client_phone']
Previous section
Numeric: int, float, order