Skip to content

Added NotNullOrZero Attribute + test + website modifications#49

Open
Edddy wants to merge 1 commit intosrkirkland:masterfrom
Edddy:master
Open

Added NotNullOrZero Attribute + test + website modifications#49
Edddy wants to merge 1 commit intosrkirkland:masterfrom
Edddy:master

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