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

Added NotNullOrZero Attribute + test + website modifications #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Edddy
Copy link

@Edddy Edddy commented Aug 17, 2012

This attribute is useful when Required is not enough because the value
can't be zero either (Great for IDs)

This attribute is useful when Required is not enough because the value
can't be zero either (Great for IDs)
@srkirkland
Copy link
Owner

Unfortunately this validator won't work client-side, so I'm not going to merge quite yet. Maybe you can create a client attribute adapter that uses both a "required" rule and a "non-zero" rule (currently a non-zero rule doesn't exist)? Also did you consider just doing something like [Required] along with [Min(1)]?

@Edddy
Copy link
Author

Edddy commented Sep 11, 2012

Yes, I currently use Min(1) but have to change the message everytime (want to avoid) and it's not semantic enough (want to avoid).

Will work on the client side and let you know.

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

Successfully merging this pull request may close these issues.

2 participants