From 9a4991f2e392dddfaed6df31b86ac27b3ecb5e25 Mon Sep 17 00:00:00 2001 From: Gautier DI FOLCO Date: Mon, 2 Oct 2023 00:31:35 +0200 Subject: [PATCH] fixup! Add Workspace name validation (#834) --- src/Monocle/Config.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Monocle/Config.hs b/src/Monocle/Config.hs index b417d99d1..dcc93cbf9 100644 --- a/src/Monocle/Config.hs +++ b/src/Monocle/Config.hs @@ -482,7 +482,7 @@ getIdentByAliasFromIdents alias idents' = case find isMatched idents' of mkIndexName :: Text -> Either Text IndexName mkIndexName name = do - let check name p = if p then Right () else Left name + let check explanation p = if p then Right () else Left explanation check "Is empty" $ not $ T.null name check "Is longer than 255 bytes" $ BS.length (T.encodeUtf8 name) < 256 check "Contains uppercase letter(s)" $ T.all (\x -> not (isLetter x) || isLowerCase x) name