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

패키지 상세v0.0.7

string_validator_plus

Flutter 앱에서 데이터 검증을 간소화하세요! 이메일, 비밀번호 등을 검증하세요. 직관적인 인터페이스, 정확한 검증. 지금 다운로드하세요!

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
19
좋아요
13
Pub 점수
140

패키지 설치

flutter pub add string_validator_plus

패키지 개요

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

StringValidatorPlus는 애플리케이션 내 문자열 검증을 간편하게 만들기 위해 설계된 플러터 패키지입니다. 이는 이메일, 비밀번호, 전화번호 및 사용자 정의 패턴과 같은 일반적인 데이터 유형을 검증하기 위한 직관적인 인터페이스를 제공합니다. 정확하고 신뢰할 수 있는 검증 로직을 통해 안드로이드, iOS, 웹, macOS, Windows, 리눅스 플랫폼에서 데이터 무결성을 보장하는 데 도움을 줍니다. 패키지는 pub.dev를 통해 플러터 프로젝트에 쉽게 통합되며, 특정 사용 사례에 대한 간편한 맞춤 설정도 지원합니다.

사용 사례

  • 폼 입력 검증
  • 이메일 및 비밀번호 확인
  • 전화번호 형식 지정
  • 사용자 정의 패턴 매칭
  • 사용자 등록 흐름
  • 데이터 무결성 강제 적용

주요 기능

  • 일반적인 형식을 위한 사전 구축된 검증기
  • 사용하기 쉬운 API
  • 크로스 플랫폼 호환성
  • 사용자 정의 정규 표현식 패턴을 지원합니다
  • 경량이고 빠름
  • 직관적인 오류 메시지

적합한 대상

  • Flutter 초보자
  • 폼 중심 애플리케이션
  • 인증 시스템
  • 데이터 입력 인터페이스
  • 모바일 및 웹 앱

고려 사항

  • 복잡한 규칙에 대해 수동 설정이 필요합니다
  • 문자열 기반 검증에 제한됨
  • 내장된 국제화 없음
  • 외부 정규 표현식 패턴에 의존합니다
  • 문자열이 아닌 데이터 유형에는 적합하지 않습니다

원본 README

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

string_validator_plus

Simplify data validation in Flutter apps! Validate emails, passwords, and more. Intuitive interface, accurate validation. Download now!

Platform Support

Platform Support
Android ✓
iOS ✓
Web ✓
MacOS ✓
Linux ✓
Windows ✓

Installation

  • Add it as a dependency in their pubspec.yaml:
  1. Add the latest version of package to your pubspec.yaml (and rundart pub get):

        dependencies:
          string_validator_plus: ^0.0.4
    
  2. Import the package and use it in your Flutter App.

        import 'package:string_validator_plus/string_validator_plus.dart';
    

Example

  final registrationFormKey = GlobalKey<FormState>();
  TextEditingController _email = TextEditingController();
  
  Form(
          key: loginUserFormKey,
          child: TextFormField(
            autovalidateMode: AutovalidateMode.onUserInteraction,
            controller: _email,
            validator: validateEmail,
            onChanged: (value) {
              setState(() {
                _email = value;
              });
            },
          ),
        ),      
            
  • You just need to specify the type of validation you need, and you don't need to write much code.

  // Example of using string extensions
  String myString = "flutter toolbox+";
  String titleCaseString = myString.toTitleCase();
  
  if (kDebugMode) {
    print(titleCaseString);
  } 
  // Output: "Flutter Toolbox+"
        
  • If you want to use an extension, you just have to add it after your string.

Key Features

  • Email Validation: Seamlessly validate email addresses to ensure correct data entry and avoid invalid inputs.

  • Password Validation: Easily verify password strength and security for user authentication, enhancing data protection.

  • Confirm Password Validation: Effortlessly match and confirm password entries, providing a seamless user experience.

  • Different Country Documents Validation: Validate various country-specific documents, ensuring accurate data submission for legal and identity purposes.

  • Mobile Number Validation: Verify and validate mobile numbers to ensure global user interaction and error-free communication.

  • Driving Licence Validation: Validate driving license details for streamlined user authentication and regulatory compliance.

  • Postal Code Validation: Ensure accurate data entry for location-based information with reliable postal code validation.

  • Integer Validation: Effortlessly check and validate integers for numerical data accuracy, preventing invalid inputs.

  • List Validation: Validate lists to manage data entries effectively, reducing errors in data processing.

Int Handling Essentials

  • Find Factorial Extension: Calculate the factorial of an integer with the "factorial" extension for the int class.

  • Check Number is Odd or Even Extension: Conveniently check if an integer is odd or even using the "isEven" and "isOdd" getters for the int class.

  • Check if an Integer is Prime Extension: Easily determine if an integer is a prime number with the "isPrime" getter for the int class.

  • Calculate the Greatest Common Divisor (GCD) Extension: Calculate the GCD of two integers using the "gcd" method for the int class.

  • Check if an Integer is a Perfect Square Extension: Check if an integer is a perfect square with the "isPerfectSquare" getter for the int class.

  • Find the Least Common Multiple (LCM) Extension: Calculate the LCM of two integers using the "lcm" method for the int class.

  • Generate a List of Divisors Extension: Generate a list of all divisors of an integer using the "divisors" getter for the int class.

  • Check if an Integer is a Power of Two Extension: Determine if an integer is a power of two with the "isPowerOfTwo" getter for the int class.

  • Convert an Integer to Hexadecimal Representation Extension: Convert an integer to its hexadecimal representation with the "toHexadecimalString" method for the int class.

  • Convert an Integer to Binary Representation Extension: Convert an integer to its binary representation with the "toBinaryString" method for the int class.

  • Convert an Integer to Octal Representation Extension: Convert an integer to its octal representation with the "toOctalString" method for the int class.

  • Check if an Integer is a Palindrome Extension: Determine if an integer is a palindrome (reads the same backward as forward) with the "isPalindrome" getter for the int class.

  • Find the Number of Digits in an Integer Extension: Calculate the number of digits in an integer with the "numberOfDigits" getter for the int class.

  • Calculate the Sum of Digits of an Integer Extension: Find the sum of the digits in an integer with the "sumOfDigits" getter for the int class.

Text Handling Extensions

  • Trim Leading and Trailing Whitespace Extension: Easily trim leading and trailing whitespace from a string with the "trimWhitespace" extension for the String class.

  • Capitalize First Letter Extension: Capitalize the first letter of a string effortlessly using the "capitalizeFirstLetter" extension for the String class.

  • Convert to Title Case Extension: Convert a string to title case, where the first letter of each word is capitalized, with the "toTitleCase" extension for the String class.

  • Replace All Occurrences Extension: Replace all occurrences of a specified substring with another string using the "replaceAllOccurrences" extension for the String class.

  • Check if a String Contains Only Digits Extension: Determine if a string contains only digits with the "containsOnlyDigits" extension for the String class.

  • Check if a String Contains Only Letters Extension: Check if a string contains only letters (alphabets) using the "containsOnlyLetters" extension for the String class.

  • Reverse a String Extension: Effortlessly reverse the characters in a string with the "reverse" extension for the String class.

  • Count Occurrences of a Substring Extension: Count the occurrences of a specified substring within a string using the "countOccurrences" extension for the String class.

  • Check if a String is Palindrome Extension: Determine if a string is a palindrome (reads the same backward as forward) using the "isPalindrome" extension for the String class.

  • Mask Sensitive Information Extension: Protect sensitive information like credit card numbers or passwords by masking characters with the "maskSensitiveInformation" extension for the String class.

  • Generate Random Strings Extension: Create random strings of specified lengths for various use cases like token generation using the "generateRandomString" extension for the String class.

List Utils+

  • Check if a List is Empty Extension: Easily check if a list is empty with the "isEmptyList" getter for the List class.

  • Remove Duplicates from a List Extension: Remove duplicate elements from a list and obtain a new list with unique elements using the "removeDuplicates" method for the List class.

  • Shuffle the Elements of a List Extension: Shuffle the elements of a list randomly and get a new shuffled list using the "shuffle" method for the List class.

Why Choose string_validator_plus?

  • Comprehensive: Covering a wide range of validation types, string_validator_plus serves as an all-in-one solution for your validation needs, reducing the need for multiple packages.

  • Intuitive Interface: Designed with developers in mind, it offers an easy-to-use interface for seamless integration into your Flutter projects.

  • Error Reduction: Say goodbye to manual validation errors, as string_validator_plus automates the process with reliability, improving data accuracy.

  • Regular Updates: We are committed to providing regular updates and improvements to ensure the package stays up-to-date with the latest Flutter trends and best practices.

There are many string functions, the extension is still listed above the description, and all introductions are not written, so please check everything after installing the package.

카테고리

의존성

의존성 목록 1 개

  • plugin_platform_interface^2.0.2

소스 저장소

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

아직 데이터가 없습니다.