func (m *OrderIDInitialMarginPair) Validate(formats strfmt.Registry) error {
	var res []error
	if err := m.validateInitialMargin(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateOrderID(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
Validate validates this order id initial margin pair
package models
import (
	strfmt "github.com/go-openapi/strfmt"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/swag"
	"github.com/go-openapi/validate"
)
type OrderIDInitialMarginPair struct {
	InitialMargin *float64 `json:"initial_margin"`
	OrderID OrderID `json:"order_id"`
}