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

패키지 상세v2.6.0

regexpattern

Flutter 정규 표현식 패턴 목록 및 문자열 검증 목적

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
4천
좋아요
129
Pub 점수
150

패키지 설치

flutter pub add regexpattern

패키지 개요

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

문자열 검증을 위한 정규 표현식 패턴의 선별된 목록을 제공하는 플러터 패키지입니다. 각 패턴은 명확한 목적과 함께 제공되어 다양한 플랫폼에서 일관되고 신뢰할 수 있는 입력 검증을 쉽게 구현할 수 있도록 합니다. 폼 필드, 인증 흐름, 데이터 정제에 이상적이며, 사용자 입력을 이메일, 전화번호, 비밀번호 등 일반적인 검증 규칙과 매칭하는 과정을 단순화합니다. 이 패키지는 Android, iOS, Web, macOS, Windows, Linux를 포함한 모든 주요 플랫폼을 지원합니다.

사용 사례

  • 폼 검증
  • 이메일 및 전화번호 확인
  • 비밀번호 강도 검증
  • 데이터 입력 정제
  • 사용자 등록 흐름
  • 텍스트 필드 마스킹

주요 기능

  • 사전 정의된 정규 표현식 패턴
  • 명확한 목적 설명
  • 크로스 플랫폼 호환성
  • Flutter 폼과의 간편한 통합
  • 경량이고 집중된
  • GitHub에서 오픈소스

적합한 대상

  • 양식을 개발하는 개발자
  • 입력 검증이 필요한 앱
  • 팀이 검증 로직을 표준화하고 있습니다
  • 다중 플랫폼을 대상으로 하는 프로젝트
  • 빠른 검증 솔루션을 찾는 프론트엔드 개발자

고려 사항

  • 사전 정의된 패턴에 제한됨
  • 패턴별로 사용자 정의할 수 없습니다
  • 새로운 패턴을 위해 수동 업데이트 필요
  • 내장된 오류 메시지 없음
  • 추가 검증 로직과 함께 사용하는 것이 가장 좋습니다
  • 업데이트를 외부 소스에 의존합니다

원본 README

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

RegexPattern

Flutter collection of regex pattern for string validation.

Getting Started

In your flutter project add the dependency:

dependencies:
  ...
  regexpattern: ^2.6.0

Usage

Importing package
import 'package:regexpattern/regexpattern.dart';
Using RegexPattern
Matching string to pattern
bool hasMatch = RegexValidation.hasMatch(<String>, <RegexPattern>);

or

String text = 'https://google.com';
bool isUrl = text.isUrl(); // text.is<Pattern>();
RegexPattern

Collection of regex pattern used to validating data

Pattern username;
Pattern usernameV2;
Pattern usernameGoogle;
Pattern usernameInstagram;
Pattern usernameDiscord;
Pattern email;
Pattern url;
Pattern uri;
Pattern phone;
Pattern hexadecimal;
Pattern vector;
Pattern image;
Pattern audio;
Pattern video;
Pattern txt;
Pattern doc;
Pattern excel;
Pattern ppt;
Pattern apk;
Pattern pdf;
Pattern html;
Pattern dateTimeUTC;
Pattern dateTime;
Pattern binary;
Pattern md5;
Pattern sha1;
Pattern sha256;
Pattern ssn;
Pattern ipv4;
Pattern ipv6;
Pattern isbn;
Pattern github;
Pattern passport;
Pattern currency;
Pattern numericOnly;
Pattern alphabetOnly;
Pattern alphaNumericOnly;
Pattern alphaNumericSymbolOnly;
Pattern noWhitespace;
Pattern passwordEasy;
Pattern passwordNormal1;
Pattern passwordNormal2;
Pattern passwordNormal3;
Pattern passwordHard;
Pattern passwordEasyAllowedWhitespace;
Pattern passwordNormal1AllowedWhitespace;
Pattern passwordNormal2AllowedWhitespace;
Pattern passwordNormal3AllowedWhitespace;
Pattern passwordHardAllowedWhitespace;
Pattern uuid;
Pattern bitcoinAddress;
Pattern bitcoinTaprootAddress;
Pattern bitcoinSegwitAddress;
Pattern ethereumAddress;

CONTRIBUTION

If you wish to contribute, fork this repository and add your regex. Create a PR & i'll check it.

LICENSE

BSD 3-Clause License

Copyright (c) 2020, Agung Nursatria
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
   list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation
   and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
   contributors may be used to endorse or promote products derived from
   this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

카테고리

소스 저장소

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