Closed drehelis closed 1 year ago
Hello , This doesn't seem to work. I tried the exact pattern mentioned in this thread , but there doesn't seem to be any validation on the Input Field or am I missing something
The parameter section below : -
"parameters": [ { "name": "Input", "required": true, "param": "-i", "envvar": "INP", "type": "text", "regex": { "pattern": "^([a-z0-9\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$", "description": "Input Validation" } }
Regards, Ashish .A. Poojary
Hi @ashishp0911, how did you test it? This PR was not merged, i.e. not available in script server builds.
@bugy My Bad , I spoke too early. I mistook the closed case #466 and thought this feature has been implemented in the latest build. Any updates on the rollout of this feature ?
I have to apologize to @drehelis for missing that one. To be honest I was waiting for "review request", but I had to check this ticket on my own. Totally my fault for not tracking the project properly.
I made some minor adjustments, and will wait for build before merging. Probably tomorrow.
I was in a need for special form of
text
field validation done on the frontend. This PR tries to solve this by adding regular-expression validation capabilities.Couple of caveats -
\
when editing JSON config manually is required.Can't get the Admin UI properly generateregex
object. Hence, WiP :-)Parameter config should look like:
Small demo:
https://user-images.githubusercontent.com/11921235/121894690-1afb6100-cd28-11eb-8b36-a59df6a3c53f.mov