Method | Description | |
---|---|---|
AddDataValidationError ( this state, string errorMessage ) : void |
Adds an error to the model state that has to do with data validation, this is generally used for JSON responses
|
|
IsValid ( this state, string prefix ) : bool |
Checks if there are any model errors on any fields containing the prefix
|
|
Merge ( this state, ModelStateDictionary dictionary, string prefix ) : void |
Merges ModelState that has names matching the prefix
|
|
ToJsonErrors ( this state ) : System.Web.Mvc.JsonResult |
Serializes the ModelState to JSON for JavaScript to interrogate the errors
|
public static AddDataValidationError ( this state, string errorMessage ) : void | ||
state | this | |
errorMessage | string | |
return | void |
public static IsValid ( this state, string prefix ) : bool | ||
state | this | |
prefix | string | |
return | bool |
public static Merge ( this state, ModelStateDictionary dictionary, string prefix ) : void | ||
state | this | |
dictionary | ModelStateDictionary | |
prefix | string | |
return | void |
public static ToJsonErrors ( this state ) : System.Web.Mvc.JsonResult | ||
state | this | |
return | System.Web.Mvc.JsonResult |