Nucleus .Net Core CMS

ModelStateExtensions Class

Namespace: Nucleus.Extensions
Assembly: Nucleus.Extensions.dll
Extensions used to read and manipulate a Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.

Methods

RemovePrefix (ModelStateDictionary,String) Method

RemovePrefix (ModelStateDictionary modelState, String prefix)
Remove all items with the specifed prefix from model state

Remove<T0, T1> (ModelStateDictionary,Expression<T0>) Method

Remove<T0, T1> (ModelStateDictionary modelState, Expression<T0> expression)
Remove an item from model state, specified by an expression.
Parameters
Name Type
modelState Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary
expression System.Linq.Expressions.Expression<T0>

ToErrorString (ModelStateDictionary) Method

ToErrorString (ModelStateDictionary modelState)
Convert a ModelStateDictionary to a comma-separated string, suitable for on-screen display.