Quantcast
Channel: Fluent Validation for .NET
Viewing all articles
Browse latest Browse all 1917

Edited Issue: MVC client-side validation of "default" rules [7135]

$
0
0
I've read the discussion about the magic "default" ruleset: http://fluentvalidation.codeplex.com/discussions/285831

The rules are not passed to the client though, unless I use the workaround of manually creating a ruleset with "default" as its name.

The tests below are with FV built from source.

``` c#
// Rules in the "Create" set are passed to the client
// Rules not in a set are not passed to the client
[RuleSetForClientSideMessages("Create")]

// Rules in the "Create" set are passed to the client
// Rules in the "default" set not passed to the client
[RuleSetForClientSideMessages("Create")]

// Rules in the "Create" set are passed to the client
// Rules not in a set are not passed to the client
[RuleSetForClientSideMessages("default", "Create")]

// Rules in the "Create" set are passed to the client
// Rules in the "default" set are also passed to the client
[RuleSetForClientSideMessages("default", "Create")]
```

Viewing all articles
Browse latest Browse all 1917

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>