File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
src/Wizard/Service/Questionnaire Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ library:
6060 - raw-strings-qq
6161 - rdf4h
6262 - regex-compat
63+ - regex-tdfa
6364 - resource-pool
6465 - scientific
6566 - servant
Original file line number Diff line number Diff line change @@ -3,9 +3,8 @@ module Wizard.Service.Questionnaire.QuestionnaireValidation where
33import Control.Monad.Except (throwError )
44import Data.Foldable (forM_ , traverse_ )
55import qualified Data.Map.Strict as M
6- import Data.Maybe (isJust )
76import qualified Data.UUID as U
8- import Text.Regex ( matchRegex , mkRegex )
7+ import Text.Regex.TDFA
98
109import Shared.Common.Localization.Messages.Public
1110import Shared.Common.Model.Error.Error
@@ -35,8 +34,6 @@ validateQuestionnaireTag tag = forM_ (isValidProjectTag tag) throwError
3534
3635isValidProjectTag :: String -> Maybe AppError
3736isValidProjectTag tag =
38- if isJust $ matchRegex validationRegex tag
37+ if tag =~ " ^[^,]+$ "
3938 then Nothing
4039 else Just $ ValidationError [] (M. singleton " tags" [_ERROR_VALIDATION__FORBIDDEN_CHARACTERS tag])
41- where
42- validationRegex = mkRegex " ^[^,]+$"
You can’t perform that action at this time.
0 commit comments