(t *RecordTransaction)
| 54 | } |
| 55 | |
| 56 | func destinationOrDestinationsValidation(t *RecordTransaction) validation.RuleFunc { |
| 57 | return func(value interface{}) error { |
| 58 | if (t.Destination == "" && len(t.Destinations) == 0) || (t.Destination != "" && len(t.Destinations) > 0) { |
| 59 | return errors.New("either destination or destinations is required, not both") |
| 60 | } |
| 61 | return nil |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | func (l *CreateLedger) ValidateCreateLedger() error { |
| 66 | return validation.ValidateStruct(l, |
no outgoing calls