(val interface{}, v *InterfaceValidation)
| 64 | } |
| 65 | |
| 66 | func ValidateInterfaceProvided(val interface{}, v *InterfaceValidation) (interface{}, error) { |
| 67 | if v.CantBeSpecifiedErrStr != nil { |
| 68 | return nil, ErrorFieldCantBeSpecified(*v.CantBeSpecifiedErrStr) |
| 69 | } |
| 70 | |
| 71 | if !v.AllowExplicitNull && val == nil { |
| 72 | return nil, ErrorCannotBeNull(v.Required) |
| 73 | } |
| 74 | return validateInterface(val, v) |
| 75 | } |
| 76 | |
| 77 | func validateInterface(val interface{}, v *InterfaceValidation) (interface{}, error) { |
| 78 | if v.RequireCortexResources { |
no test coverage detected