You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The for option should have a handled output with an error message, optionally a custom error message would be awesome.
voidValidateModel(RegisterModelmodel){//Force exceptionmodel=null;varresult=ValitRules<RegisterModel>.Create().Ensure(m => m.Email,_=>_.Required().Email()).Ensure(m => m.Password,_=>_ .Required().MinLength(10)).Ensure(m => m.Age,_=>_.IsGreaterThan(16)).For(model).Validate();if(result.Succeeded){// do something on success}else{// do something on failure}}
The text was updated successfully, but these errors were encountered:
The for option should have a handled output with an error message, optionally a custom error message would be awesome.
The text was updated successfully, but these errors were encountered: