From 30fcfb8ce97415f810a2eec926460c800b86f272 Mon Sep 17 00:00:00 2001 From: Philippe Pittoli Date: Sun, 31 Mar 2024 21:52:53 +0200 Subject: [PATCH] Better errors for protocol inputs. --- src/App/DisplayErrors.purs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/App/DisplayErrors.purs b/src/App/DisplayErrors.purs index 5649716..d36e401 100644 --- a/src/App/DisplayErrors.purs +++ b/src/App/DisplayErrors.purs @@ -29,7 +29,7 @@ error_to_paragraph v = Bulma.error_message (Bulma.p $ show_error_title v) ValidationDNS.VEPriority min max n -> Bulma.p $ "Priority should have a value between " <> show min <> " and " <> show max <> ", current value: " <> show n <> "." ValidationDNS.VESRV err -> maybe default_error show_error_domain err.error - ValidationDNS.VEProtocol err -> maybe default_error show_error_protocol err.error + ValidationDNS.VEProtocol err -> maybe protocol_error show_error_protocol err.error ValidationDNS.VEPort min max n -> Bulma.p $ "Port should have a value between " <> show min <> " and " <> show max <> ", current value: " <> show n <> "." ValidationDNS.VEWeight min max n -> Bulma.p $ "Weight should have a value between " <> show min <> " and " <> show max @@ -44,6 +44,7 @@ error_to_paragraph v = Bulma.error_message (Bulma.p $ show_error_title v) ValidationDNS.DKIMInvalidKeySize min max -> show_error_key_sizes min max ) where default_error = Bulma.p "" + protocol_error = Bulma.p "Accepted protocols are: tcp, udp." show_error_key_sizes :: forall w i. Int -> Int -> HH.HTML w i show_error_key_sizes min max