Suggestion to Improve Validator Argument Syntax in RAIL #1127
takeshiyagiuchi
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using Guardrails with RAIL and finding it very helpful, but I have a suggestion.
Currently, when specifying validators in RAIL, the arguments for validators are passed using space-separated values, like this:
In this format, you must provide all preceding arguments, even if you only want to specify the later ones. I believe it would improve readability if the argument names were included explicitly, like this:
Additionally, I wonder if the on-fail behavior could be included directly in the validator arguments, like this:
This could eliminate the need for users to figure out attributes like
on-fail-guardrails_valid_length
, improving both clarity and ease of use.However, I’m not sure if there’s a specific reason for the current design. This is just my suggestion, and I'd appreciate any feedback or insights you could provide.
Beta Was this translation helpful? Give feedback.
All reactions