Цю сторінку ще не перекладено українською, тому нижче англійська версія.

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 = [])

Опції

ОпціяЗначення
$nameDefault captcha.
class, style, placeholder, sizeAttributes of the input.

Приклад

Код

return form()
    ->email()
    ->captcha();

Примітки

  • The image comes from /dynamic/captcha_image; the answer is kept in the session.
  • Validate with the captcha rule: validate(['captcha' => 'captcha']).

Див. також: form/validate, demo:form/captcha