private static ValidationErrors ValidateObject(MyType obj) { ValidationErrorsBuilder e = default(ValidationErrorsBuilder); e.Add(BasicValidators.NotNull(obj.F3).Nest("f3")); e.Add(BasicValidators.NotNull(obj.F4).Nest("f4")); e.Add(Validators.CustomValidator(obj)); if ((object)obj.F4 != null) { e.Add(Validators.CustomValidator(obj.F4).Nest("f4")); } if ((object)obj.F1 != null) { e.Add(Validators.CustomValidator(obj.F1).Nest("f1")); } if (obj.F2 != null) { e.Add(Validators.MySpecialStringValidator(0, obj.F2).Nest("f2")); } if (obj.F3 != null) { e.Add(Validators.MySpecialStringValidator(12, obj.F3).Nest("f3")); } return(e.Build()); }
private static ValidationErrors ValidateObject(Scalar123 obj) { ValidationErrorsBuilder e = default(ValidationErrorsBuilder); e.Add(BasicValidators.NotNull(obj.Value).Nest("value")); ValidateObjectExtension(ref e, obj); return(e.Build()); }
private static ValidationErrors ValidateObject(A obj) { ValidationErrorsBuilder e = default(ValidationErrorsBuilder); e.Add(BasicValidators.NotNull(obj.PropA).Nest("propA")); e.Add(BasicValidators.NotNull(obj.PropAX).Nest("propAX")); return(e.Build()); }
private static ValidationErrors ValidateObject(CustomValidatorTest obj) { ValidationErrorsBuilder e = default(ValidationErrorsBuilder); e.Add(BasicValidators.NotNull(obj.F1).Nest("f1")); if (obj.F1 != null) { e.Add(Validators.MySpecialStringValidator(0, obj.F1).Nest("f1")); } return(e.Build()); }
private static ValidationErrors ValidateObject(Composite123 obj) { ValidationErrorsBuilder e = default(ValidationErrorsBuilder); e.Add(BasicValidators.NotNull(obj.Field543).Nest("Field543")); if (obj.Field543 != null) { e.Add(Validators.MySpecialStringValidator(0, obj.Field543).Nest("Field543")); } e.Add(BasicValidators.Range(1, 10, obj.AbcSS).Nest("abcSS")); ValidateObjectExtension(ref e, obj); return(e.Build()); }
private static ValidationErrors ValidateObject(User obj) { return(ValidationErrors.Join(BasicValidators.NotNull(obj.Name).Nest("name"), BasicValidators.NotNull(obj.Email).Nest("email"))); }
private static ValidationErrors ValidateObject(Robot obj) { return(BasicValidators.NotNull(obj.Name).Nest("name")); }
private static ValidationErrors ValidateObject(Email obj) { return(BasicValidators.NotNull(obj.Value).Nest("value")); }
private static ValidationErrors ValidateObject(A obj) { return(BasicValidators.NotNull(obj.A2).Nest("a")); }
private static ValidationErrors ValidateObject(B obj) { return(BasicValidators.NotNull(obj.PropB).Nest("propB")); }
private static ValidationErrors ValidateObject(Composite123 obj) { return(BasicValidators.NotNull(obj.StringF).Nest("StringF")); }
private static ValidationErrors ValidateObject(Y obj) { return(BasicValidators.NotNull(obj.P).Nest("p")); }