-
Notifications
You must be signed in to change notification settings - Fork 9
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
Example BGP custom data validator not working #113
Comments
Thanks for submitting this issue, @Glynn608. We may have introduced a breaking change which impacted the CheckARIN example. I'm working through that now, but in that case, the validator fails completely. It sounds like you may be seeing something different. Can you confirm which example you tried to use? Was it the CheckARIN example or your own code? |
Initially it was my own code. It didn't fail it, just seemed to not do anything. No errors, no logs. I moved onto the CheckARIN example as I assumed I was missing something but also had no luck with that either 🙂 Can you tag me in the PR with working example when you get round to it please. |
I've updated the example from the blog and submitted PR #114. Give that a try and let me know if you have any issues. I'll update the documentation and tests separately, but that PR will give you a starting point. Also, the default behavior of schema-enforcer is to only output errors. You can use the |
This was a great help I have it functioning now. My config wasn't finding the validators folder :( Follow up question, is it intended that the validators folder lives in the
It might be nice to add an example .toml file and other folders to example 4 and update the defaults for validators in the docs https://github.com/networktocode/schema-enforcer/blob/main/docs/configuration.md#default-configuration-settings |
The default is
I'm open to switching the default to being nested in the main_directory along with the others though. |
Environment
Expected Behavior
The schema should load and validate data against the
validate
function with exits ofself.add_validation_error()
andself.add_validation_pass()
Observed Behavior
The schema appears to be registering but doesn't action anything in the script.
Steps to Reproduce
Side note, the example4 folder doesn't seems to exist like in the blog post, does anyone have a working example of custom validators using https://github.com/networktocode/schema-enforcer/blob/develop/docs/custom_validators.md#basevalidation?
Maybe I'm missing something in the .toml file? Any examples?
The text was updated successfully, but these errors were encountered: