blob: ac9cc37de9f03dc9b4d910f84276602793e4db9b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
module Common.Validation.SignIn
( email
, password
) where
import Data.Text (Text)
import Data.Validation (Validation)
import Common.Model.Email (Email (..))
import Common.Model.Password (Password (..))
import qualified Common.Validation.Atomic as Atomic
email :: Text -> Validation Text Email
email = fmap Email . Atomic.minLength 5
password :: Text -> Validation Text Password
password = fmap Password . Atomic.minLength 8
|