From e1e07ea7c2da9823fcf9ff7a170d209431a8d640 Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Tue, 9 Aug 2022 13:16:13 +0300 Subject: [PATCH] chore(plex): add valid_chars and docs (#3399) * chore(plex): add valid_chars and docs * adapt to new questions template --- charts/stable/plex/docs/validation.md | 16 ++++++++++++++++ charts/stable/plex/questions.yaml | 5 +++-- 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 charts/stable/plex/docs/validation.md diff --git a/charts/stable/plex/docs/validation.md b/charts/stable/plex/docs/validation.md new file mode 100644 index 00000000000..664376bb619 --- /dev/null +++ b/charts/stable/plex/docs/validation.md @@ -0,0 +1,16 @@ +# Input Validation + +**`Advertise IP`** +Accepted formats are: + +- `https://192.168.1.100:32400` +- `https://192.168.1.100:32400` +- `http://dnsname:32400` +- `https://dnsname:32400` + +Regex used to match this: `^http(s)?:\/\/.*:\d*$` +You can try live [here](https://regex101.com/r/3ehGWY/1) + +--- + +_If you find a field that you think it needs validation, please open an issue on github_ diff --git a/charts/stable/plex/questions.yaml b/charts/stable/plex/questions.yaml index 60993602512..77f2322085d 100644 --- a/charts/stable/plex/questions.yaml +++ b/charts/stable/plex/questions.yaml @@ -21,10 +21,11 @@ questions: attrs: - variable: ADVERTISE_IP label: "Advertise IP" - description: "IP to advertise to Plex" + description: "IP to advertise to Plex, Change SERVER_IP to your actual server IP" schema: type: string - default: "" + valid_chars: '^http(s)?:\/\/.*:\d*$' + default: "http://SERVER_IP:32400" - variable: ALLOWED_NETWORKS label: "Allowed Networks" description: "Networks allowed to connect to plex. Add your local network IP to this list"