Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The new FubuMVC.Validation bottle is completely drop-in and doesn't require much configuration at all. If you want to configure the chains it applies to, simply do:</p> <p>AlterSettings(x => ...); &lt;--- in your FubuRegistry</p> <p>Right <em>now</em>, we don't do conventional validation that way out-of-the-box. You have two ways:</p> <ol> <li>Attributes</li> <li>The OverridesFor DSL in FubuMVC.</li> </ol> <p>Examples of both of those can be found here (respectively):</p> <ol> <li><a href="https://github.com/DarthFubuMVC/fubuvalidation/blob/master/src/FubuMVC.Validation.StoryTeller/User.cs" rel="nofollow">https://github.com/DarthFubuMVC/fubuvalidation/blob/master/src/FubuMVC.Validation.StoryTeller/User.cs</a></li> <li><a href="https://github.com/DarthFubuMVC/fubuvalidation/blob/master/src/FubuMVC.Validation.StoryTeller/AccessorOverridesModel.cs" rel="nofollow">https://github.com/DarthFubuMVC/fubuvalidation/blob/master/src/FubuMVC.Validation.StoryTeller/AccessorOverridesModel.cs</a></li> </ol> <p><strong>That being said...</strong></p> <p>Anything that implements IFieldValidationSource gets automatically registered into your container. This is how we convert from OverridesFor to rules, for example:</p> <p><a href="https://github.com/DarthFubuMVC/fubuvalidation/blob/master/src/FubuMVC.Validation/AccessorRulesFieldSource.cs" rel="nofollow">https://github.com/DarthFubuMVC/fubuvalidation/blob/master/src/FubuMVC.Validation/AccessorRulesFieldSource.cs</a></p> <p>So you could reflect on that property and return an EmailFieldRule. Something like this:</p> <p><a href="https://gist.github.com/4540861" rel="nofollow">https://gist.github.com/4540861</a></p> <p>Hope this helps,</p> <p>Josh</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload