Skip to content

BaseUniqueConstraintSaveBehavior.UniqueViolation method

Creates the validation error that is thrown when a unique constraint is violated.

protected static ValidationError UniqueViolation(IEnumerable<Field> fields, 
    ITextLocalizer localizer, string? errorMessage)
parameter description
fields Fields that make up the unique constraint.
localizer Text localizer.
errorMessage Optional custom error message.

See Also