-
Notifications
You must be signed in to change notification settings - Fork 44
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
Start_in date field cannot be nil #23
Comments
Hi @ohenrik |
Hi This is my validation method The records are simply just to have both the start and the end date empty. I think we have found the problem and I'm working on a fork. So if you want i can make a pull request a bit later? |
@ohenrik it would be awesome. So I will wait. |
Hi @ohenrik , did you do any progress with this issue? I'm afraid that what you found is not a bug, but a feature ;) |
And if you create record which have |
Hi @robinbortlik, sorry not yet, haven't had time yet. I agree that that is smart when eather start date or the end date is empty, since then for example an event can go on for ever. However when both of them are empty it should be considered as "no date range set" or else this validation will also validate that these fields are set if any other records exists. (e.g. validates presence of ). which is not always desired. At least there should be an option to allows both dates to be empty and then not validate them. |
Also the validation message will often become confusing, since it is not obvious that and empty date means since forever and until forever. I feel that empty start and end dates should be eather allowed or validated with the "presence" validator. |
It seems like the field containing the from date (start date) has to be present or the validation for overlapping dates will be fired. I assume this is a bug as not all records necessarily need to have a date period specified.
I'm using ruby version 2.2.1 and Rails 4.2.1
The text was updated successfully, but these errors were encountered: