-
-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
Describe the bug
I discovered if I fill wrong result in calc guard field, calc guard shows error message in English, even though my site is in Czech. This is the relevant part of the controller:
$form = new Form([
// other rules ...
"captcha" => [
"rules" => ["required", "num"],
"message" => "Vyplňte pole"
],
]);
This is the template:
<label>
Vypňte výsledek příkladu <?= uniform_captcha() ?> =
<?= captcha_field("", "contact-form__field"); ?>
</label>
<?php if(array_key_exists("captcha", $form->errors())): ?>
<p class="contact-form__error"><?= $form->errors()["captcha"][0] ?></p>
<?php endif; ?>
Now, when I leave the captcha field blank, the returned error message is as defined in new Form()
.
But when I fill wrong result (let's say 3 + 3 = 77), English error message 'Please solve the arithmetic problem.' is returned.
Expected behavior
Czech error message should be shown.
Additional context
I tried it in Kirby 4.6.1 plainkit with the latest Uniform.
Metadata
Metadata
Assignees
Labels
No labels