v1.0.1
queen_validators
플러터 폼을 위한 검증 메서드 및 규칙 모음, 추가 위젯 없이
80좋아요 63330일 다운로드135Pub 점수
AndroidiOSWebmacOSWindowsLinux
사전 구축된 함수 qValidator 함수를 사용하여 변수 및 양식 검증
^2.0.1{"sdk":"flutter"}{"sdk":"flutter"}^1.8.2아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
Q U E E N 👑For More Features OUT-OF-THE-BOX (localization) see Official Documentation siteValidators 🌍Pub License: MIT issues Pull requests forks Starts style: lint codecov
if you need
@override
Widget build(BuildContext context) {
return TextFormField(
// use qValidator function and provider list of rules to apply on this field
validator: qValidator([
IsRequired(),
IsOptional()
IsEmail(),
MinLength(8),
MaxLength(30, "optionally you can override the failure if the validation fails"),
]),
);
}
if you need to show a custom error message you can
ValidatorsLocalization.on (scooped for the entire Type rules)void main() {
ValidatorsLocalization.on<IsRequired>((rule) => 'the new required message');
}