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

Validate specific values in addition to their types #14

Closed
skippyPeanutButter opened this issue Jan 2, 2017 · 0 comments
Closed

Validate specific values in addition to their types #14

skippyPeanutButter opened this issue Jan 2, 2017 · 0 comments

Comments

@skippyPeanutButter
Copy link
Owner

Currently, yamlbot will only validate that the datatype of a value is allowed for a specific key.

language: some_language

The current behavior of yamlbot is to check that some_language is of type string.

It would be ideal to be able to validate that specific values for different keys are correct.
Building upon the previous example.

language: some_language

This new behavior should check that some_language is a valid value by checking it against a list of approved languages. If the language is not in the list, consider it a violation and print out a message listing the approved values. This new behavior could possibly be triggered by using a new key specific_values, as opposed to the accepted_types key.

skippyPeanutButter added a commit that referenced this issue Jan 13, 2017
Previous behavior only allowed yamlbot to validate key values
as a specific data type. This change will allow users to specify
a list of specific values to validate a key against.

Resolves: issue #14
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

1 participant