目录
目录README.md

NerdzValidation

Package to easy validate text just by passing validation rules!

Code Examples

To validate email text field, that is required and should be have at least 4 and at most 200 characters:

let validationRules: [ValidationRule] = [
            NotEmptyRule(errorMessage: errorMessage),
            ShouldBeInRangeRule(
                lowerBoundErrorMessage: errorMessage,
                upperBoundErrorMessage: errorMessage,
                lowerBound: 4,
                upperBound: 200
            ),
            RegexValidationRule(regexPattern: regexString, errorMessage: errorMessage)
        ]
"someEmail@gmail.com".validate(with: validationRules)
关于
62.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号