Password
Purpose: password entry field
Field type in SQL table: char and varchar, values are entered into the database as a hash and are not shown when editing a record.
Additional parameters:
min_length
Purpose: minimum length
Possible values: integer, positive, non-zero
Default: 6
letters_required
Purpose: mandatory presence of letters in the password
Possible values: true, false
Default: false
digits_required
Purpose: mandatory presence of digits in the password
Possible values: true, false
Default: false
must_match
Purpose: when creating/editing a record, the field value must match another field (password repetition), creating a separate field in the model for password repetition usually does not make sense, therefore this field in the form better to add dynamically.
Possible values: string, field name in models and forms
Default: null
salt
Purpose: an individual salt for hashing the password in the database specifically for this model field. In general, the APP_TOKEN value from the .env file is used.
Possible values: strings like 'NWaUKooZiGkcovR6xOEWd7aytqvq7YVk'
Default: value from .env file
Examples:
['Password', 'password', 'password', [
'required' => true,
'letters_required' => true,
'digits_required' => true,
'min_length' => 8,
'salt' => 'NWaUKooZiGkcovR6xOEWd7aytqvq7YVk'
]
]
['Password repeat', 'password', 'password_repeat', [
'required' => true,
'must_match' => 'password'
]
]
Previous section
Special string: url, redirect, email, phone