/// <summary> /// Overriden. Compares if a <see cref="ValidationError"/> instance is equal to this /// <see cref="ValidationError"/> instance. /// </summary> /// <param name="obj"></param> /// <returns></returns> public bool Equals(ValidationError obj) { return Equals(obj.Message, Message) && Equals(obj.Property, Property); }
/// <summary> /// Removes a validation error from the result. /// </summary> /// <param name="error"></param> public void RemoveError(ValidationError error) { if (_errors.Contains(error)) _errors.Remove(error); }
/// <summary> /// Adds a validation error into the result. /// </summary> /// <param name="error"></param> public void AddError(ValidationError error) { _errors.Add(error); }
/// <summary> /// Overriden. Compares if a <see cref="ValidationError"/> instance is equal to this /// <see cref="ValidationError"/> instance. /// </summary> /// <param name="obj"></param> /// <returns></returns> public bool Equals(ValidationError obj) { return(Equals(obj.Message, Message) && Equals(obj.Property, Property)); }