This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Web/Controller/Users.hs | |
action CreateUserAction = do | |
let user = newRecord @User | |
-- Get the value from the password confirmation input field. | |
let passwordConfirmation = param @Text "passwordConfirmation" | |
user | |
|> fill @["email", "passwordHash"] | |
-- We ensure that the error message doesn't include | |
-- the entered password. | |
|> validateField #passwordHash (isEqual passwordConfirmation |> withCustomErrorMessage "Passwords don't match") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Web.View.Sessions.New where | |
import IHP.AuthSupport.View.Sessions.New | |
import Web.View.Prelude | |
instance View (NewView User) where | |
html NewView { .. } = [hsx| | |
<div class="h-100" id="sessions-new"> | |
<div class="d-flex align-items-center"> | |
<div class="w-100"> |