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

Is it possible to have an empty Date field? #14

Open
ychaker opened this issue Jun 3, 2013 · 0 comments
Open

Is it possible to have an empty Date field? #14

ychaker opened this issue Jun 3, 2013 · 0 comments

Comments

@ychaker
Copy link

ychaker commented Jun 3, 2013

I have field called 'end_date' defined in my schema as:

property 'endDate', Date

and under my User model I have the current validation:

User.validatesFormatOf 'endDate', with: /dddd-dd-dd/, {message: 'should be in the following format: yyyy-mm-dd'}, allowBlank: true

Is there a way to allow for empty/blank values? The validation works but saving the user gives the following error: EndDate is invalid (Invalid Date)

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

No branches or pull requests

1 participant