Skip to content
New issue

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

Proposal to Digit validator #11374

Closed
davihu opened this issue Feb 5, 2016 · 1 comment
Closed

Proposal to Digit validator #11374

davihu opened this issue Feb 5, 2016 · 1 comment
Assignees
Milestone

Comments

@davihu
Copy link

davihu commented Feb 5, 2016

It would be nice, when Digit validator can handle integer as well as string value. I enabled orm.cast_on_hydrate and all Digit validations are now triggering an error because of int types :)

Please change actual behavior to

if (is_int($value) || ctype_digit($value)) {
  return true;
}
@sergeyklay
Copy link
Contributor

Fixed in the 2.1.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants