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

Timeframe length validator for Date fields #73

Open
groenroos opened this issue Nov 14, 2020 · 2 comments
Open

Timeframe length validator for Date fields #73

groenroos opened this issue Nov 14, 2020 · 2 comments
Assignees
Labels
feature Brand new features to Sapling low priority Issues which should only be considered after everything else is done

Comments

@groenroos
Copy link
Member

Add a model property that allows the developer to validate incoming Date fields against the current date; for example, date must be more than 18 years ago, or date must be less than 3 months ago.

Would be useful for storing dates of birth where there's also an age requirement.

Need to figure out a clear and concise notation for this, since I don't want it to be like PHP's date() where every dang time you need to use it, you have to look up the magic hieroglyphs that correspond to the different date elements.

@groenroos groenroos added feature Brand new features to Sapling low priority Issues which should only be considered after everything else is done labels Nov 14, 2020
@groenroos groenroos added this to the M3 - Release 3.0 milestone Nov 14, 2020
@groenroos groenroos self-assigned this Nov 14, 2020
@groenroos
Copy link
Member Author

Probably most likely want to use some NLP based formatting here, like chrono, to avoid the definition of the constraints being too hieroglyphic.

@groenroos
Copy link
Member Author

Probably most likely want to use some NLP based formatting here, like chrono, to avoid the definition of the constraints being too hieroglyphic.

And probably find a way to cache the parsed definition, so that it's not parsing NLP each time Sapling touches the model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Brand new features to Sapling low priority Issues which should only be considered after everything else is done
Development

No branches or pull requests

1 participant