Closed
Description
Describe the bug
The Numericality allows spaces when validating
To Reproduce
Create a field with a Numericality validator. Type "1 " and it will pass
Expected behavior
I would expect this would not pass.
Details
- Phalcon version: 5.4.0
- PHP Version: 8.2
Additional context
I have a number field in my form, that eventually will be stored in the DB as a number. The input is validated using Numericality, because it must be a number. Something like "1 " or "1 1" passes with Numericality. And then I get an error from the DB because it's not a valid number. So then I would have to write extra logic for it to work.
Metadata
Metadata
Assignees
Type
Projects
Status
Released