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

Ability to pass function to property defaults #96

Open
vinerz opened this issue Aug 19, 2015 · 1 comment
Open

Ability to pass function to property defaults #96

vinerz opened this issue Aug 19, 2015 · 1 comment

Comments

@vinerz
Copy link

vinerz commented Aug 19, 2015

Hello!

I'd wish to have a way to pass a function to default such as Date.now, so when the key is not set, Seraph fires it and set the key's value to its return value.

Thanks again,
Vinicius

@andyrichardson
Copy link
Contributor

Yes, if you look here, you'll see that you can set a default value within your schema.

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

2 participants