Class HasValidationErrorsExtensions
Inheritance
object
HasValidationErrorsExtensions
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Volo.Abp.Validation
Assembly: Volo.Abp.Validation.dll
Syntax
public static class HasValidationErrorsExtensions
Methods
WithValidationError<TException>(TException, ValidationResult)
Declaration
public static TException WithValidationError<TException>(this TException exception, ValidationResult validationError) where TException : IHasValidationErrors
Parameters
Type | Name | Description |
---|---|---|
TException | exception | |
System.ComponentModel.DataAnnotations.ValidationResult | validationError |
Returns
Type | Description |
---|---|
TException |
Type Parameters
Name | Description |
---|---|
TException |
WithValidationError<TException>(TException, string, params string[])
Declaration
public static TException WithValidationError<TException>(this TException exception, string errorMessage, params string[] memberNames) where TException : IHasValidationErrors
Parameters
Type | Name | Description |
---|---|---|
TException | exception | |
string | errorMessage | |
string[] | memberNames |
Returns
Type | Description |
---|---|
TException |
Type Parameters
Name | Description |
---|---|
TException |