diff options
author | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2018-02-26 15:58:10 +1100 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2018-02-27 11:43:37 +1100 |
commit | fb8dbd274b4b2c4df52d09d2fe303ccdacdf546b (patch) | |
tree | 2c9f045c242ea2ee4c043423861f82ba424bbf1b /ui/ncurses/nc-config.c | |
parent | 7e0b9da2ae2f96d24c711c0ad4d12bb193ec49c0 (diff) | |
download | talos-petitboot-fb8dbd274b4b2c4df52d09d2fe303ccdacdf546b.tar.gz talos-petitboot-fb8dbd274b4b2c4df52d09d2fe303ccdacdf546b.zip |
ui/ncurses: Validate URL fieldv1.7.0
Make sure the URL field is a valid URL before allowing the user to
proceed.
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'ui/ncurses/nc-config.c')
-rw-r--r-- | ui/ncurses/nc-config.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/ncurses/nc-config.c b/ui/ncurses/nc-config.c index 8ffa5ef..5c0f23b 100644 --- a/ui/ncurses/nc-config.c +++ b/ui/ncurses/nc-config.c @@ -1042,6 +1042,7 @@ static void config_screen_setup_widgets(struct config_screen *screen, screen->widgets.url_l = widget_new_label(set, 0, 0, _("URL:")); screen->widgets.url_f = widget_new_textbox(set, 0, 0, 32, url); + widget_textbox_set_validator_url(screen->widgets.url_f); screen->widgets.url_help_l = widget_new_label(set, 0, 0, _("(eg. tftp://)")); |