Skip to content

Commit f3528b4

Browse files
committed
Processed review comments
1 parent 4b26041 commit f3528b4

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/Form/State.elm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,12 @@ type alias FormState =
4444

4545
{-| Settings for forms initialization:
4646
47-
- `customFormats` where keys are the accepted custom formats (e.g., personal-number-se\_bank\_id) and values are validation functions for the formats.
47+
- `customFormats` where keys are the accepted custom formats (e.g., personal-number-se, personal-number-no, personal-number-dk,
48+
company-number-dk, personal-number-fi) and values are validation functions for the formats.
4849
4950
-}
5051
type alias Settings =
51-
{ customFormats : Dict String (String -> Result String String)
52+
{ customFormats : Dict String (String -> Result () String)
5253
}
5354

5455

src/Form/Validation.elm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ validateFormat settings format value =
165165
|> Maybe.map (\validation -> validation value)
166166
|> Maybe.withDefault (Result.Ok value)
167167
in
168-
Result.mapError (\err -> error (Error.InvalidCustomFormat err)) customValidation
168+
Result.mapError (\_ -> error (Error.InvalidCustomFormat customFormat)) customValidation
169169

170170

171171
validatePattern : String -> String -> Validation String

0 commit comments

Comments
 (0)