Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Numericality and Digit validators

What's the real difference between them ?



33.6k
Accepted
answer

Digits, uses ctype_digit function which rejects values such as 1820.20 or -500

In the other hand numericality allows these valid numbers: