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

ORM: Implement 'nullable' and 'required' column flags #1

Open
ghengeveld opened this issue Mar 22, 2012 · 0 comments
Open

ORM: Implement 'nullable' and 'required' column flags #1

ghengeveld opened this issue Mar 22, 2012 · 0 comments

Comments

@ghengeveld
Copy link
Owner

To allow simple field validation with a sensible error message, a 'required' flag should be added as alternative to 'minlength' => 1. Default value should be false.

In createTable() there is already a 'null' flag implemented, but it's only used to set the MySQL column flag NULL or NOT NULL. It makes more sense to rename this to 'nullable', because it can also be not null. Furthermore this flag should allow 'required' or 'minlength' > 0 columns to accept null as a valid value.

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

No branches or pull requests

1 participant