Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

Add validation to user sign up #247

Open
will-nemo opened this issue Oct 6, 2020 · 5 comments
Open

Add validation to user sign up #247

will-nemo opened this issue Oct 6, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@will-nemo
Copy link
Member

Need to add validation for Name Email and password inputs.

password just needs to be over 6 characters and need to match

@will-nemo will-nemo added the enhancement New feature or request label Oct 6, 2020
@Gautam-Arora24
Copy link
Member

Can I work on this issue?

@will-nemo
Copy link
Member Author

Can I work on this issue?

The view needs to be created for the validation to be added

@Gautam-Arora24
Copy link
Member

We can use validators in the backend. What say?

@0xLeif
Copy link
Member

0xLeif commented Oct 15, 2020

@haIIux
Copy link

haIIux commented Aug 19, 2022

This now needs to require at least 8 characters as the new, rewritten backend requires it.
User.swift - Line 178

/// Validations which ensure fields are met before POST.
extension User.Create: Validatable {
    static func validations(_ validations: inout Validations) {
        validations.add("email", as: String.self, is: !.empty && .email)
        validations.add("password", as: String.self, is: !.empty && .count(8...), required: true)
    }
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants