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.