Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version: 3.0.4
I know this is uninteresting use case.
If you want validate Integer by Numeric rule, than throw exception.
Here is form for sanbox. Let's fill value and send.
<?php declare(strict_types=1); namespace App\Presenters; use Nette\Application\UI\Form; final class HomepagePresenter extends BasePresenter { protected function createComponentForm() { $form = new Form(); $form->addInteger('trim') ->addCondition($form::FILLED) ->addRule($form::NUMERIC, 'Musí být číslo.'); // my fix ->addRule($form::FILLED, 'Musí být číslo.'); $form->addSubmit('send'); $form->onSuccess[] = function ($form, $values) { dumpe($values); }; return $form; } }
The form try to validate input value.
In Validator::validateNumeric expected string but int given. Maybe cast value?
The text was updated successfully, but these errors were encountered:
8eb0d40
Validator::validateNumeric() accepts unsigned integer [Closes #246]
c57f604
9e3af90
054a59b
dcb77cc
No branches or pull requests
Version: 3.0.4
I know this is uninteresting use case.
Bug Description
If you want validate Integer by Numeric rule, than throw exception.
Steps To Reproduce
Here is form for sanbox. Let's fill value and send.
Expected Behavior
The form try to validate input value.
Possible Solution
In Validator::validateNumeric expected string but int given. Maybe cast value?
The text was updated successfully, but these errors were encountered: