func (o *UpdatePetWithFormParams) bindName(raw string, formats strfmt.Registry) error {
	if err := validate.RequiredString("name", "formData", raw); err != nil {
		return err
	}

	o.Name = raw

	if err := o.validateName(formats); err != nil {
		return err
	}

	return nil
}
func (o *UpdatePetWithFormParams) bindStatus(raw string, formats strfmt.Registry) error {
	if err := validate.RequiredString("status", "formData", raw); err != nil {
		return err
	}

	o.Status = raw

	if err := o.validateStatus(formats); err != nil {
		return err
	}

	return nil
}
예제 #3
0
func (o *DeletePetParams) bindAPIKey(raw string, formats strfmt.Registry) error {
	if err := validate.RequiredString("apiKey", "header", raw); err != nil {
		return err
	}

	o.APIKey = raw

	if err := o.validateAPIKey(formats); err != nil {
		return err
	}

	return nil
}