captcha() form()
A captcha image with its input; the field is required and checked by the captcha validation rule.
form()->captcha($name = '', $desc = '', $extra = [], $replace = [])Опції
| Опція | Значення |
|---|---|
$name | Default captcha. |
class, style, placeholder, size | Attributes of the input. |
Приклад
Код
return form()
->email()
->captcha();Примітки
- The image comes from
/dynamic/captcha_image; the answer is kept in the session. - Validate with the
captcharule:validate(['captcha' => 'captcha']).
Див. також: form/validate, demo:form/captcha