(t *RecordTransaction)
| 45 | } |
| 46 | |
| 47 | func sourceOrSourcesValidation(t *RecordTransaction) validation.RuleFunc { |
| 48 | return func(value interface{}) error { |
| 49 | if (t.Source == "" && len(t.Sources) == 0) || (t.Source != "" && len(t.Sources) > 0) { |
| 50 | return errors.New("either source or sources is required, not both") |
| 51 | } |
| 52 | return nil |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | func destinationOrDestinationsValidation(t *RecordTransaction) validation.RuleFunc { |
| 57 | return func(value interface{}) error { |
no outgoing calls