Jet\Form_Field_Password / Form_Field::TYPE_PASSWORD
Represents a form field for hidden password entry.
It uses the Jet\Form_Renderer_Field_Input_Common renderer to display the form field itself.
Default error codes
Code | Meaning of |
---|---|
Form_Field::ERROR_CODE_EMPTY | The field is marked as required and no value has been entered. |
Form_Field::ERROR_CODE_CHECK_NOT_MATCH | The check (repeated) entry of the password does not agree with the first entry. |
Form_Field::ERROR_CODE_WEAK_PASSWORD | Password too weak. |
Method | Význam |
---|---|
public generateCheckField( string $field_name, string $field_label, string $error_message_empty, string $error_message_not_match ) : Form_Field_Password |
To enter a password, a method can be used where the user enters the password in two fields and checks that they match each other. The generation and function of such a control field is still a repetitive piece of code. For this reason, this form field allows its control "twin" to be generated and set automatically. For example like this:
use Jet\Form;
|