Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for conditional requirement of variables #203

Open
MB175 opened this issue Jan 17, 2022 · 0 comments
Open

Support for conditional requirement of variables #203

MB175 opened this issue Jan 17, 2022 · 0 comments

Comments

@MB175
Copy link

MB175 commented Jan 17, 2022

type Specification struct {
	FEATURETOGGLE   bool `required:"true"`
	FEATURESETTING  string `conditionalRequired:"{FEATURETOGGLE == true}"`

}

Feature description:

  • Be able to make field a requirement based on the fact if a given condition is met or not.
    For example, if the featuretoogle is turned on make all fields with the conditionalRequired Tag required if their condition is met.

Feel free to close this right away if this feature is somehow present already, in case I overlooked it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant