public static ValidationError CreateException(string errorCode, string errorMessage, string fieldName) { var error = new ValidationErrorField(errorCode, fieldName, errorMessage); return(new ValidationError(new ValidationErrorResult(new List <ValidationErrorField> { error }))); }
public ValidationError(ValidationErrorField validationError) : this(validationError.ErrorCode, validationError.ErrorMessage) { this.Violations.Add(validationError); }
public static ValidationError CreateException(ValidationErrorField error) { return new ValidationError(error); }
public static ValidationError CreateException(string errorCode, string errorMessage, string fieldName) { var error = new ValidationErrorField(errorCode, fieldName, errorMessage); return new ValidationError(new ValidationErrorResult(new List<ValidationErrorField> { error })); }
public static ValidationError CreateException(ValidationErrorField error) { return(new ValidationError(error)); }
public static ValidationError CreateException(ValidationErrorField error) => new ValidationError(error);