To do

  • Finish NHibernateValidatorRulesProvider
  • Add fluent API for instantiating a RuleSet (for quick demos and so people have an alternative to model-based validation when they want it)
  • Add mechanism for customising/localising the default validation messages that appear when you don't specify explicit ones
  • Add IJavaScriptRule interface and CustomJavaScriptRulesProvider (and document them)
  • Document example of reusing a rules config for each element in a list (e.g., for an editable grid)
  • Ensure all date handling respects thread culture's date formatting/parsing rules
  • Additional comparison validators (less than, greater than, less than or equal, greater than or equal)
  • Set validators ("enter A, B, or C"), if there is a clear use case

Last edited Feb 5, 2009 at 10:48 PM by SteveSanderson, version 1


cttoy Jan 21, 2010 at 3:18 PM 
Although the [HandleError] can catch some kinds of errors, but the errors can not show on the current views, jump to another custom error page I think it is not a good experience for the clients.

cttoy Jan 21, 2010 at 3:14 PM 
I want to use xVal to show the model-level errors to the views, such as the SqlException errors.

denis_n Nov 25, 2009 at 8:30 PM 

I don't know if this is the right place, but I have a suggestion.

When I use DataAnnotations attribute: [RegularExpression(@"(?s)(^[\S]$)|(^[\S].*[\S]$)", ErrorMessage = "Message should not start or end with whitespace")]
generated regex for javascript doesn't work.
(?s) enables singleline mode and results in: "Pattern":"(?s)(^[\\S]$)|(^[\\S].*[\\S]$)"