패키지, 저장소 및 앱 카테고리 검색

flutter_pw_validator 표지
패키지 상세v2.0.0

flutter_pw_validator

Flutter Pw Validator 패키지는 사용자가 로그인 시 입력한 비밀번호를 귀하의 규칙에 따라 검증하는 데 도움을 줍니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
2.8천
좋아요
176
Pub 점수
160

패키지 설치

flutter pub add flutter_pw_validator

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

Flutter Pw Validator는 사용자가 입력한 비밀번호를 사용자 정의 가능한 규칙에 따라 검증하도록 설계된 가벼운 패키지입니다. 최소 길이, 특수 문자 포함 여부 또는 숫자 요구 사항과 같은 특정 기준을 충족하고 비밀번호 강도를 보장하는 데 도움이 됩니다. 인증 흐름에 이상적이며, 여러 플랫폼의 로그인 폼에 원활하게 통합할 수 있습니다. Android, iOS, Web, macOS, Windows 및 Linux를 지원하여 크로스플랫폼 애플리케이션에 유연하게 활용할 수 있습니다. 간단한 API를 통해 개발자는 복잡한 검증 로직을 작성하지 않고도 안전한 비밀번호 정책을 쉽게 적용할 수 있습니다.

사용 사례

  • 사용자 등록 양식
  • 비밀번호 강도 검사
  • 보안 로그인 워크플로우
  • 인증 양식 검증
  • 보안 정책 준수

주요 기능

  • 사용자 정의 검증 규칙
  • 크로스 플랫폼 지원
  • 간단한 통합
  • 실시간 피드백
  • 가볍고 빠름

적합한 대상

  • 안전한 인증 시스템을 구축하는 개발자
  • 강력한 암호 정책을 요구하는 앱
  • 크로스 플랫폼 플러터 애플리케이션
  • 모바일 및 웹 앱에서의 폼 검증
  • 사용자 보안을 우선시하는 팀

고려 사항

  • 수동 규칙 구성이 필요합니다
  • 내장된 UI 컴포넌트 없음
  • 개발자가 정의한 기준에 따라 다릅니다
  • 비밀번호 검증만 가능
  • 복잡한 자격 증명 관리에 적합하지 않습니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Flutter Password Validator

License Pub Version GitHub stars


Flutter Password Validator package helps you to validate sign-in user-entered passwords with your rules.

How to use

1- Depend on it
Add it to your package's pubspec.yaml file:
dependencies:
  flutter_pw_validator: <latest>
2- Install it
Install packages from the command line:
flutter pub get
3- Usage
First You have to import the file:
import 'package:flutter_pw_validator/flutter_pw_validator.dart';
And then just put it right under your password TextField and pass the controller to that:
new TextField(
    controller: _passwordController
),
new FlutterPwValidator(
    controller: _passwordController,
    minLength: 6,
    uppercaseCharCount: 2,
    lowercaseCharCount: 2,
    numericCharCount: 3,
    specialCharCount: 1,
    width: 400,
    height: 150,
    onSuccess: yourCallbackFunction,
    onFail: yourCallbackFunction
)
Properties
Property Description Default Value Required
controller Takes your password TextField controller null Yes
minLength Takes total minimum length of password null Yes
uppercaseCharCount Takes minimum uppercase character count that has to include in the password 0 No
lowercaseCharCount Takes minimum lowercase character count that has to include in the password 0 No
numericCharCount Takes minimum numeric character count that has to include in the password 0 No
specialCharCount Takes minimum special character count that has to include in the password 0 No
width Takes the widget width null Yes
height Takes the widget height null Yes
onSuccess A void callback function that runs when the password is matched with the condition(s) null Yes
onFail A void callback that gets called everytime the password doesn't match with the condition(s) null No
defaultColor Takes default state color of the widget Color(0xFFd3d3d3) No
successColor Takes success state color of the widget Color(0xFF2ee292) No
failureColor Takes failure state color of the widget Color(0xFFf9433e) No
strings A class implementing the default FlutterPwValidatorStrings English FlutterPwValidatorStrings No
key Key to access the widget state and its functions GlobalKey<FlutterPwValidatorState>() null No

i18n

If you want to translate this plugin simply implements the FlutterPwValidatorStrings class and pass it to the widget.

class FrenchStrings implements FlutterPwValidatorStrings {
  @override
  final String atLeast = 'Au moins - caractères';
  @override
  final String uppercaseLetters = '- Lettres majuscules';
  @override
  final String numericCharacters = '- Chiffres';
  @override
  final String specialCharacters = '- Caractères spéciaux';
}

FlutterPwValidator(
    // ...
    // your config above
    strings: FrenchStrings()
)

Example Project

You can use this example project to see how it works.

카테고리

의존성

의존성 목록 1 개

  • password_rules^1.0.0

소스 저장소

이 패키지를 사용하는 프로젝트