パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v2.6.0

regexpattern

Flutterの正規表現パターンと文字列検証目的の一覧

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
4020
いいね数
129
Pub ポイント
150

パッケージをインストール

flutter pub add regexpattern

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

文字列の検証に適した正規表現パターンのキュレートリストを提供するFlutterパッケージです。各パターンには明確な目的が付随しており、異なるプラットフォーム間で一貫性があり信頼できる入力検証を簡単に実装できます。フォームフィールド、認証フロー、データのクリーニングに最適であり、ユーザー入力をメールアドレス、電話番号、パスワードなど一般的な検証ルールと照合するプロセスを簡素化します。このパッケージは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.

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト