protected string FormatError(DtoValidationError error, string format) { if (error != null) { return(string.Format(format, error.Property, error.StringValue, error.Message)); } else { return(Constants.DtoValidationErrorMissing); } }
internal bool Validate(string name, DtoValidationError problem) { if (Validation == null) { Validation = new DtoValidation(); } if (problem != null) { problem.Property = name; problem.Message = string.Format(problem.Message, name); Validation.Add(problem); return(false); } return(true); }
public void Add(DtoValidationError error) { Errors.Add(error); }