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.

Class Numericality not found

hi i am new to phalcon tried to download invo application and run it , after exporting the database and logging in when i click on products tab it says Fatal error: Class 'Phalcon\Validation\Validator\Numericality' not found in D:\xampp\htdocs\phalcon\invo\app\forms\ProductsForm.php on line 53

i am using xampp on windows php version 5.3.8 and Phalcon extension phalconx86VC9php5.

can some one help me out it looks like the validator class doesnot exist in phalcon, do i need to update my php and extension for phalcon regards, Omer Aslam

Hello my friend i have the same problem with you. Its the windows that creates your error. In ubuntu 14.04 its ok... Its a bug inside phlacon extension maybe for windows...

I've read somewhere in forum that invo example was adjusted to work with Phalcon 2, where this Validator exists.

In version 1 it doesn't.

edited Dec '14

Means if i have windows then i have no life :/ and how do i detect if i am using phalcon 1 or 2


No, this means if you use version 1.3.3 of Phalcon you have no Numericality validator ;-)

echo Phalcon\Version::get(); displays 1.3.3 and phalcon 2 dlls arent available yet at phalcons site

oh yes if you have windows no life.... axaxaxxa in my experience is better linux


use Phalcon\Mvc\Model\Validator\Numericality instead of Phalcon\Validation\Validator\Numericality

edited Apr '15

according to doc

the "Phalcon\Validation\Validator\" doesn't seem to have "Numericality"

Thanks a lot. That fixed it for me!

>use Phalcon\Mvc\Model\Validator\Numericality >instead of Phalcon\Validation\Validator\Numericality


>according to doc > >the "Phalcon\Validation\Validator\" has "PresenceOf", "Email", but doesn't seem to have "Numericality"


Your answer worked for me too!

>use Phalcon\Mvc\Model\Validator\Numericality >instead of Phalcon\Validation\Validator\Numericality