We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

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 phalcon_x86_VC9_php5.3.9_1.3.3

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



3.4k
Accepted
answer

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



712

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



25.7k
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

Thanks.

according to doc

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



161

Your answer worked for me too!

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