diff --git a/src/App/DisplayErrors.purs b/src/App/DisplayErrors.purs index 8fa0273..10ff86d 100644 --- a/src/App/DisplayErrors.purs +++ b/src/App/DisplayErrors.purs @@ -1,7 +1,7 @@ -- | This module provides functions to display errors in a fancy way. module App.DisplayErrors where -import Prelude (show, ($), (<>)) +import Prelude (show, ($), (<>), (==)) -- import Data.Foldable as Foldable import Data.Maybe (Maybe(..), maybe) @@ -60,7 +60,9 @@ error_to_paragraph v = Bulma.error_message (Bulma.p $ show_error_title v) show_error_key_sizes :: forall w i. Int -> Int -> HH.HTML w i show_error_key_sizes min max - = Bulma.p $ "Chosen signature algorithm only accepts public key input between " + = if min == max + then Bulma.p $ "Chosen signature algorithm only accepts public key input of " <> show min <> " characters." + else Bulma.p $ "Chosen signature algorithm only accepts public key input between " <> show min <> " and " <> show max <> " characters." -- | `show_error_title` provide a simple title string to display to the user in case of an error with an entry.