#Pseudocode Example: A Signup Form ##Entities
- Email field: input type = email, placeholder: “[email protected]”
- Password field: input type = password, placeholder: “Password”
- Password confirmation field: input type = password, placeholder: “Password again”
- Signup submit: value: “Sign Up”, default state, disabled
##Signup Flow/Logic
###On leave focus of email field
IF email is blank
Error message: “Please enter an email address.”
ELSE IF email field value is not a valid email address
Error message: “This doesn’t look like an email address. Please try again.”
###On leave focus of password
IF password is not sufficiently strong
Error message: “Please replace with a stronger password.”
###On leave focus of password confirmation
IF password confirmation does not match password
Error message: “Please replace with a stronger password.”
###On leave focus of email, password or password confirmation
IF email AND password AND password confirmation all contain valid values
Enable Signup Submit
##Discussion topics:
-
What constitutes a sufficiently strong password?
-
What constitutes a valid email? Eg do we want to allow “[email protected]”
-
What should we do if the email already is in use?
eg ELSE IF email field already is in use
Error message: “This email is already in use. Did you want to [Sign In] instead?”