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

CLI types need additional attribute for customizing error messages #106

Open
pprindeville opened this issue Feb 15, 2024 · 0 comments
Open
Labels
feature Feature request

Comments

@pprindeville
Copy link

When using a specification like:

<basedn:string regexp:"(((CN|cn)=([^,]*)),)?((((CN|cn|OU|ou)=[^,]+,?)+),)?(((DC|dc)=[^,]+,?)+)">

a failure to match this generates the following diagnostic:

tnsr1 tnsr(config-ldap)# basedn "wrong"
Feb 15 12:41:31: clicon_parse result:0 command: "basedn "wrong""
CLI syntax error: "basedn "wrong"": "wrong" is invalid input for cli command: basedn
tnsr1 tnsr(config-ldap)# 

which is generic enough to be of little help.

Recommending an additional field called error-message:<string> that would allow CLI writers to customize error messages.

The string could optionally contain a %s field.

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

No branches or pull requests

2 participants