// Validate returns an error if the user inputs are invalid.
Validate returns an error if the user inputs are invalid.
// Validate returns an error if the user inputs are invalid .
func (o *deployJobOpts) Validate() error {
	if o.appName == "" {
		return errNoAppInWorkspace
	}
	if o.name != "" {
		if err := o.validateJobName(); err != nil {
			return err
		}
	}
	if o.envName != "" {
		if err := o.validateEnvName(); err != nil {
			return err
		}
	}
	return nil
}
func ( o * deployJobOpts ) Validate ( ) error { if o . appName == " " { return errNoAppInWorkspace } if o . name != " " { if err := o . validateJobName ( ) ; err != nil { return err } } if o . envName != " " { if err := o . validateEnvName ( ) ; err != nil { return err } } return nil }
Validate returns an error if the user inputs are invalid.
Validate returns an error if the user inputs are invalid .