Skip to content

Conversation

@Xixn2
Copy link
Member

@Xixn2 Xixn2 commented Apr 30, 2025

๐Ÿ’ก ๊ฐœ์š”

ํšŒ์›๊ฐ€์ž… ํŽ˜์ด์ง€ ํผ๋ธ”๋ฆฌ์‹ฑ

๐Ÿ“ƒ ์ž‘์—…๋‚ด์šฉ

  • ์ •๋ณด์ž…๋ ฅ ํŽ˜์ด์ง€๋ฅผ ํผ๋ธ”๋ฆฌ์‹ฑ ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ํšŒ์›๊ฐ€์ž… ํŽ˜์ด์ง€๋ฅผ ํผ๋ธ”๋ฆฌ์‹ฑ ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ์ •๋ณด์ž…๋ ฅ, ๋น„๋ฐ€๋ฒˆํ˜ธ, ์ด๋ฉ”์ผ, ์ธ์ฆ์ฝ”๋“œ ๋“ฑ ๊ฐ์ข… ์ •๊ทœ์‹์„ ์ถ”๊ฐ€ ํ–ˆ์Šต๋‹ˆ๋‹ค.

๐ŸŽจ ์„ค๋ช…์ฝ”๋“œ

์ •๊ทœ์‹ ์ฝ”๋“œ

extension Validator {
    static func hasEmailError(_ email: String) -> Bool {
        !email.isEmpty && !isValidEmail(email)
    }

    static func hasPasswordError(_ password: String) -> Bool {
        !password.isEmpty && !isValidPassword(password)
    }

    static func hasPasswordCheckError(_ password: String, _ passwordCheck: String) -> Bool {
        !passwordCheck.isEmpty && password != passwordCheck
    }

    static func isSignUpFormValid(email: String, password: String, passwordCheck: String) -> Bool {
        isValidEmail(email) &&
        isValidPassword(password) &&
        password == passwordCheck &&
        !email.isEmpty &&
        !password.isEmpty &&
        !passwordCheck.isEmpty
    }

    static func isValidAuthCode(_ code: String) -> Bool {
        let pattern = #"^\d{5}$"#
        return code.range(of: pattern, options: .regularExpression) != nil
    }
}

๐ŸŽธ ๊ธฐํƒ€


์ •๋ณด์ž…๋ ฅ

ํšŒ์›๊ฐ€์ž…

@Xixn2 Xixn2 added 1๏ธโƒฃPriority: High ์šฐ์„ ์ˆœ์œ„ - ์ƒ โœจFeature ๊ธฐ๋Šฅ ์ถ”๊ฐ€ ๐ŸŽจPublishing ๋””์ž์ธ ๊ตฌํ˜„ โšก๏ธSimple ๊ฐ„๋‹จํ•œ ์ˆ˜์ • labels Apr 30, 2025
@Xixn2 Xixn2 requested a review from 2rjswn April 30, 2025 02:17
@Xixn2 Xixn2 self-assigned this Apr 30, 2025
@Xixn2 Xixn2 merged commit 49959e4 into master Apr 30, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1๏ธโƒฃPriority: High ์šฐ์„ ์ˆœ์œ„ - ์ƒ โœจFeature ๊ธฐ๋Šฅ ์ถ”๊ฐ€ ๐ŸŽจPublishing ๋””์ž์ธ ๊ตฌํ˜„ โšก๏ธSimple ๊ฐ„๋‹จํ•œ ์ˆ˜์ •

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ํšŒ์›๊ฐ€์ž… ํŽ˜์ด์ง€ ํผ๋ธ”๋ฆฌ์‹ฑ / ๊ธฐ๋Šฅ ์—ฐ๊ฒฐ

3 participants