Validatorless는 Yup에서 영감을 받은 Flutter 패키지로, 텍스트 입력 검증을 간소화하기 위해 설계되었습니다. 폼 필드에 대한 유효성 검사 규칙을 유연하고 직관적으로 정의할 수 있는 방법을 제공하여 개발자가 최소한의 반복 코드로 강력한 입력 검증 로직을 만들 수 있도록 합니다. 이 패키지는 다양한 검증 유형을 지원하며, 여러 플랫폼에서 Flutter 애플리케이션에 쉽게 통합할 수 있습니다. 깔끔한 문법과 확장성을 중시하여 동적 또는 복잡한 검증 워크플로우가 필요한 폼에 이상적입니다.
사용 사례
양식 입력 검증
동적 폼 검증
사용자 정의 검증 규칙
크로스 플랫폼 폼 처리
실시간 입력 피드백
검증 오류 메시지
주요 기능
Yup을 영감으로 한 문법
확장 가능한 검증 규칙
최소한의 보일러플레이트
비동기 검증을 지원합니다
Platform-agnostic
TextFormField과의 간편한 통합
적합한 대상
폼을 구축하는 플러터 개발자
실시간 검증이 필요한 앱
Yup 유사 검증 패턴을 사용하는 팀
경량 검증이 필요한 프로젝트
간단하면서도 강력한 검증을 원하는 개발자
고려 사항
완전한 프레임워크에 비해 내장 검증기가 제한적
복잡한 검증 체인을 위해 수동 설정이 필요합니다
내장된 로컬라이제이션 지원 없음
간단한부터 중간 정도의 복잡성의 검증 요구 사항에 가장 적합
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
Validatorless
This package provides a means to validate text inputs on the flutter and was inspired by Yup
dependencies:# Use the latest version available. Any is just a placeholdervalidatorless:any
TextFormField(
decoration: InputDecoration(
labelText: 'User e-mail',
),
validator: Validatorless.multiple([
Validatorless.email('The field must be an email'),
Validatorless.required('The field is obligatory')
]),
)
or use
TextFormField(
decoration: InputDecoration(
labelText: 'CPF',
),
validator: Validatorless.cpf('CPF not is valid'),
)
Pushes to master run .github/workflows/publish.yml: patch-bump pubspec.yaml (unless the push already changed the version), append CHANGELOG.md, commit with [skip ci], tag (1.3.1, no v prefix), create a GitHub Release, and dart pub publish --force.
Add a repository secret named PUB_CREDENTIALS_JSON (Settings → Secrets and variables → Actions) containing the full contents of the Dart credentials file after dart pub login:
Linux: ~/.pub-cache/credentials.json or ~/.config/dart/pub-credentials.json