Insert error - Please enter a correct email address - when email is nullable


I'm trying to do an insert I get the error message Please enter a correct email address, the email field is allowed to be null in the database. I used the phalcon generate model from terminal to create the model. Any help would be appreciated.


Hi by default Phalcon consider all not null column in your schema tables like a required. Change to accept nulls in the column or change this behavior with this

Good luck

When you generate the models with an "email" it auto creates a Validation on emails in your model at times.. kind of annoying to me.. but remove that from the model code (the validation method) and it will not throw an error