Remove slash / delimiters and add the Dart delimiters : r'^[a-z ,.'-]+$ '

Answer from user9746303 on Stack Overflow
🌐
KindaCode
kindacode.com › article › dart-regular-expression-to-check-peoples-names
Dart regular expressions to check people’s names - KindaCode
February 14, 2023 - This is a simple regex pattern to check whether a person’s name is valid in Dart (and Flutter as well):
🌐
Medium
shirsh94.medium.com › flutter-regex-make-data-validation-more-simple-with-flutter-regex-5508ee331349
Flutter Regex: Make data validation more simple with flutter_regex | by Shirsh Shukla | Medium
March 7, 2024 - In this article, we will discuss Flutter regular expressions (regex) and the flutter_regex plugin. The plugin supports over 1000 regex patterns, making it incredibly useful. From basic data validation (like usernames, emails, and passwords) to specialized patterns for different data formats and over 50 regex patterns for country IDs, these patterns cover a wide range of applications.
🌐
Pub.dev
pub.dev › packages › flutter_regex
flutter_regex | Flutter package
March 1, 2024 - The flutter_regex plugin provides comprehensive support for a wide range of regular expression patterns, including basic data validation for usernames, emails, and passwords, support for over 50 country ID regex patterns, and various other ...
Published   Feb 22, 2024
Version   0.0.3
🌐
Pub.dev
pub.dev › packages › utils_validators
utils_validators | Dart package
December 22, 2025 - ${fullName.isValidName()}'); // Output: "John Peter Smith" is valid? true // Static API (used in Flutter, but works in Dart) String? error = NameValidator.validate( invalidCase, message: 'Name capitalization is incorrect.', ); print('Error for "$invalidCase": $error'); // Output: Error for "john smith": Name capitalization is incorrect. } Validates an email address format using a robust regex pattern.
Published   Dec 13, 2024
Version   1.2.2
🌐
LogRocket
blog.logrocket.com › home › flutter form validation: the complete guide
Flutter form validation: The complete guide - LogRocket Blog
June 4, 2024 - Forms use validation as a data sanity check before processing the inputs further. Another way of ensuring that a user never enters bad data is by not allowing foreign characters to be entered in the text field. This is achieved using input formatters. inputFormatters in Flutter take a TextInputFormatter, which has a RegExp associated with it, and decides whether that RegExp has to be allowed or ignored during user input.
🌐
Medium
medium.com › coding-with-flutter › flutter-input-validation-with-regexp-8851d8defffe
Flutter: Input Validation with RegExp | by Andrea Bizzotto | Code With Andrea | Medium
January 16, 2020 - Flutter: Input Validation with RegExp Today I’m launching a new video about Input Validation and RegExp. As part of this, I’ll give you an overview of regular expressions (regex) and how they …
🌐
DhiWise
dhiwise.com › post › mastering-regex-in-flutter-a-comprehensive-how-to-guide
Beginner's Guide to Implementing Regex in Flutter
July 11, 2024 - Dart's approach to regex shares the same syntax and functionality as many other programming languages, making it a familiar tool for developers transitioning to Flutter. Whether you're checking for a first match in a string, validating an email, or extracting specific data raw expression string, regex patterns play a crucial role.
Find elsewhere
🌐
Flutter
api.flutter.dev › flutter › dart-core › RegExp-class.html
RegExp class - dart:core library - Dart API
Dart provides the basic regexp matching algorithm as matchAsPrefix, which checks if the regexp matches a part of the input starting at a specific position.
🌐
Pub.dev
pub.dev › packages › wc_form_validators
wc_form_validators | Flutter package
July 1, 2025 - This code will validate that Name is non-empty and has a character length between 5 and 10.
Published   Sep 06, 2019
Version   1.2.0
🌐
Stack Overflow
stackoverflow.com › questions › 71254774 › how-to-validate-name-in-flutter
regex - How to validate Name in flutter? - Stack Overflow
February 24, 2022 - I always solve these tough regex problems by creating a function for myself that does the same. Take a look at the function below. It summarizes what I wanted to explain · bool validation(String a){ int spaceNum = 0; int dotNum = 0; for (int i = 0; i < a.length; i++){ // check for valid characters if(!"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ .".contains(a[i])){ return false; } // check for number of spaces if (a[i] == " "){ spaceNum += 1; if (spaceNum > 5){ return false; } } // check for number of dots if (a[i] == "."){ dotNum += 1; if (dotNum > 3){ return false; } } } return true; } void main(){ print(validation("Wrong.validation.
🌐
Pub.dev
pub.dev › packages › flutter_custom_textfields
flutter_custom_textfields | Flutter package
August 1, 2025 - A Flutter package with customizable text fields, regex validation, and OTP input support with leading/trailing icons. ... A Flutter package that provides customizable text fields with built-in validation for common input types. Features include email, phone number, username, full name, OTP, password, and confirm password fields, Camera Location, Date picker with configurable validation and UI options.
Published   May 12, 2025
Version   0.0.6+2
🌐
GitHub
github.com › bizz84 › input_validation_demo_flutter
GitHub - bizz84/input_validation_demo_flutter: Flutter: Input Validation with RegExp
Demo project showing how to apply Regex validation to a Flutter TextField.
Starred by 33 users
Forked by 12 users
Languages   Dart 91.6% | Swift 4.2% | Kotlin 3.8% | Objective-C 0.4% | Dart 91.6% | Swift 4.2% | Kotlin 3.8% | Objective-C 0.4%
🌐
Code With Andrea
codewithandrea.com › videos › flutter-input-validation-with-regexp
Flutter: Input Validation with RegExp
Overview of regular expressions (regex). How to implement a Regex validator in Dart and integrate it with Flutter's TextField widget, so that we can validate user input.
🌐
KindaCode
kindacode.com › article › flutter-dart-regular-expression-examples
Flutter & Dart: Regular Expression Examples - KindaCode
August 24, 2023 - // kindacode.com import 'package:flutter/foundation.dart'; void main() { RegExp ipExp = RegExp( r"^(?!0)(?!.*\.$)((1?\d?\d|25[0-5]|2[0-4]\d)(\.|$)){4}$", caseSensitive: false, multiLine: false); // Try it // Expectation: true if (ipExp.hasMatch('192.168.1.2')) { if (kDebugMode) { print('192.168.1.2 is valid'); } } // Expectation: false if (ipExp.hasMatch('192.168.111111.55555')) { if (kDebugMode) { print('192.168.111111.55555 is valid'); } } }
🌐
LinkedIn
linkedin.com › pulse › demystifying-regex-flutter-powerful-tool-pattern-umar-abdulaziz-nse-lslpf
Demystifying Regex in Flutter: A Powerful Tool for Pattern Matching
December 24, 2023 - It lets you define patterns within strings, making tasks like data extraction, validation, and manipulation a breeze. In this newsletter, we'll dive into the fascinating world of regex for Flutter developers, exploring its capabilities and leaving you itching to unleash its power in your next project.
🌐
GitHub
github.com › JamalBelilet › regexed_validator
GitHub - JamalBelilet/regexed_validator: A library for Dart/Flutter developers for validating: phone - name - postalCode - email - url - currency - ip - date - time - htmlTags - password - creditCard
A library for Dart/Flutter developers for validating: phone - name - postalCode - email - url - currency - ip - date - time - htmlTags - password - creditCard - JamalBelilet/regexed_validator
Starred by 37 users
Forked by 10 users
Languages   Dart 100.0% | Dart 100.0%