public Convalidare LessThan(string field, IComparable number, IComparable lessThanNumber) { if (Comparar.GetComparisonResult(number, lessThanNumber) < 0) { validacoes.Add(ValidacaoOK()); } else { validacoes.Add(new ConvalidaCamposInfo(field, $"O campo {field} deve ser menor do que {lessThanNumber}.", false)); } return(this); }
public Guard LessThan(string field, IComparable number, IComparable lessThanNumber) { if (Comparar.GetComparisonResult(number, lessThanNumber) < 0) { validations.Add(ValidationOK()); } else { validations.Add(new FieldValidationInfo(field, $"O campo {field} deve ser menor do que {lessThanNumber}.", false)); } return(this); }
public Convalidare GreaterThan(string campo, IComparable number, IComparable greaterThanNumber) { if (Comparar.GetComparisonResult(number, greaterThanNumber) > 0) { validacoes.Add(ValidacaoOK()); } else { validacoes.Add(new ConvalidaCamposInfo(campo, $"O campo {campo} deve ser maior do que {greaterThanNumber}.", false)); } return(this); }
public Guard GreaterThan(string field, IComparable number, IComparable greaterThanNumber) { if (Comparar.GetComparisonResult(number, greaterThanNumber) > 0) { validations.Add(ValidationOK()); } else { validations.Add(new FieldValidationInfo(field, $"O campo {field} deve ser maior do que {greaterThanNumber}.", false)); } return(this); }