Das Auto Validate-Paket vereinfacht die Eingabeverifizierung durch den Einsatz anpassbarer regulärer Ausdrücke, wodurch die effiziente Überprüfung verschiedener Datentypen möglich wird.
Aus öffentlichen Paketdaten erstellte Orientierung.
Auto Validate ist ein Flutter-Paket, das die Eingabeverifizierung mithilfe anpassbarer regulärer Ausdrücke vereinfacht. Es ermöglicht Entwicklern, Datenformate wie E-Mails, Telefonnummern und benutzerdefinierte Muster mit minimalem Code effizient zu überprüfen. Das Paket lässt sich nahtlos in Formulare integrieren und bietet Echtzeit-Feedback sowie eine Reduzierung von Boilerplate-Validierungslogik. Für den plattformübergreifenden Einsatz konzipiert, unterstützt es Android, iOS, Web, macOS, Windows und Linux und ist somit ideal für konsistente Validierungen in unterschiedlichen Umgebungen.
Anwendungsfälle
Formularingabeüberprüfung
Echtzeit-User-Feedback
E-Mail- und Telefonnummerüberprüfung
Benutzerdefinierte Musterabgleich
Plattformübergreifende Anwendungen
Reduzierung von Validierungs-Boilerplate
Hauptmerkmale
anpassbare Regex-Muster
Echtzeit-Validierung
Plattformübergreifende Unterstützung
Minimale Einrichtung
Integration mit TextFormField
Flexible Fehlerbehandlung
Geeignet für
Entwickler, die Formulare erstellen
Apps, die eine strenge Eingabeverifizierung erfordern
Teams, die Code-Einfachheit priorisieren
Projekte für mehrere Plattformen
Frontend-orientierte Flutter-Anwendungen
Hinweise
Erfordert Verständnis der Regex-Syntax
Möglicherweise sind zusätzliche Stile für Fehlermeldungen erforderlich
Nicht geeignet für die Validierung komplexer Geschäftslogik
Eingeschränkte integrierte Validatoren über Regex hinaus
Hängt von einer korrekten Regex-Design für Genauigkeit ab
Original-README
Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.
Auto Validate
The Auto Validate Package is a unique and easy-to-use solution for automatic validation of various data types using regular expressions.
Importance
This package streamlines the validation process, allowing you to easily implement validation without needing to write the code yourself. By using this package, you can save valuable time and ensure that your input data meets the required criteria.
Usage
Here's a simple example of how to use the Auto Validate package:
String Validation Extension [New Feature]
This package provides an extension on String? that offers convenient methods for validating various input formats using the AutoValidate class. It allows for a more readable and fluent validation process in your Dart applications.
Features
Validate usernames, passwords, email addresses, phone numbers, credit card numbers, and more.
Check for valid formats like ISBN, MAC addresses, hexadecimal codes, and JSON Web Tokens (JWT).
Simplify validation checks by using fluent methods directly on String? instances.
Improve code readability and maintainability by using the extension methods for validation.
import'package:auto_validate/auto_validate.dart';
voidvalidation() {
var email = 'Dev.M.ElShenawy@Icloud.com';
var name = 'Mahmud El Shenawy';
var password = '@MahmoudElShenawy2021';
var phone = '+201098415860';
// You can validate the input using the AutoValidate classAutoValidate.email(email.toString())
? print('Email is Valid')
: print('Email is Invalid');
AutoValidate.userName(name.toString())
? print('User Name is Valid')
: print('User Name is Invalid');
AutoValidate.password(password.toString())
? print('Password is Valid')
: print('Password is Invalid');
AutoValidate.phone(phone.toString())
? print('Phone is Valid')
: print('Phone is Invalid');
// You can also use the extension methods to validate the input
email.isValidEmail
? print('Email is Valid')
: print('Email is Invalid');
name.isValidUsername
? print('User Name is Valid')
: print('User Name is Invalid');
password.isValidPassword
? print('Password is Valid')
: print('Password is Invalid');
phone.isValidPhone
? print('Phone is Valid')
: print('Phone is Invalid');
}