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

read-only field as an option #50

Closed
frankleng opened this issue Jun 14, 2016 · 3 comments
Closed

read-only field as an option #50

frankleng opened this issue Jun 14, 2016 · 3 comments

Comments

@frankleng
Copy link

Useful when enforcing fields that cannot be changed

@ksafranski
Copy link
Contributor

I apologize, I just saw this, could you give an example?

@ksafranski ksafranski self-assigned this Aug 26, 2016
@frankleng
Copy link
Author

@Fluidbyte no worries. thanks for the great lib.
I have a use case where a field is set on creation, and should not be modified afterwards. so would like to have a validation error when user is trying to update.

tho I think I might be able to workaround by using a modifier callback

@ksafranski
Copy link
Contributor

I've been thinking about this and it wouldn't really be possible at the level where Obey resides since it has no inherit knowledge of if data is going through a create or update process. You'd probably be best simply running a check inside the CRUD methods themselves.

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

2 participants