diff options
author | Indrajit Raychaudhuri <irc@indrajit.com> | 2023-11-09 15:06:33 -0600 |
---|---|---|
committer | Indrajit Raychaudhuri <irc@indrajit.com> | 2023-11-09 16:02:18 -0600 |
commit | 64322b19d6968195a6dc7c82e7e22126072377f5 (patch) | |
tree | 39c2e45a8edee504d7e470d94f7395041e183add /interface-definitions/include/url-http-https.xml.i | |
parent | 1f4e9bc3860e4829fe35ecfcbf32d9d4eb00f777 (diff) | |
download | vyos-1x-64322b19d6968195a6dc7c82e7e22126072377f5.tar.gz vyos-1x-64322b19d6968195a6dc7c82e7e22126072377f5.zip |
T5727: Use native URL validator instead of regex-based validator
Replace regex-based URL validator with native validator from vyos-utils.
Also, move `include/url.xml.i` to `include/url-http-https.xml.i` to
reflect the fact that it is used only for HTTP(S) URLs.
Diffstat (limited to 'interface-definitions/include/url-http-https.xml.i')
-rw-r--r-- | interface-definitions/include/url-http-https.xml.i | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/interface-definitions/include/url-http-https.xml.i b/interface-definitions/include/url-http-https.xml.i new file mode 100644 index 000000000..f763c2bb2 --- /dev/null +++ b/interface-definitions/include/url-http-https.xml.i @@ -0,0 +1,15 @@ +<!-- include start from url-http-https.xml.i --> +<leafNode name="url"> + <properties> + <help>Remote URL</help> + <valueHelp> + <format>url</format> + <description>Remote HTTP(S) URL</description> + </valueHelp> + <constraint> + <validator name="url" argument="--scheme http --scheme https"/> + </constraint> + <constraintErrorMessage>Invalid HTTP(S) URL format</constraintErrorMessage> + </properties> +</leafNode> +<!-- include end --> |