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

key value validation should be supported #7

Open
hoatle opened this issue May 18, 2020 · 0 comments
Open

key value validation should be supported #7

hoatle opened this issue May 18, 2020 · 0 comments

Comments

@hoatle
Copy link
Member

hoatle commented May 18, 2020

Sometimes I need to validate some key values, for example:

  • some keys are required
  • some keys are required to validate against a regular expression
  • some keys are validated against a regular expression

Validators can be plugin added in the future: required, isNumber, isBoolean, etc. (out of this issue scope), only required and regex validator is expected for this issue.

If any key values are not valid, the run step should fail with the invalid message of the associated key.

The github action input configuration could be like this:

validation: "FOO:required, BAR:/^\d+$/"

or:

validation: "FOO: required | /^\d+$/, BAR: required"

Pipeline is supported to add a chain of validators, there is no limit to use the pipeline. The key values will be validated again the validator of the pipeline chain from left to right, if any validation failed, the whole key-value valuation fails.

@hoatle hoatle added this to the v0.2.0 milestone May 18, 2020
@hoatle hoatle changed the title validating key values should be supported key value validation should be supported May 24, 2020
@hoatle hoatle modified the milestones: v0.2.0, v0.3.0 Nov 17, 2020
@hoatle hoatle removed this from the v0.3.0 milestone Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants