mirror of
https://github.com/wger-project/flutter.git
synced 2026-12-02 18:19:25 +01:00
Automatic linting
This commit is contained in:
@@ -246,13 +246,13 @@ class _AuthCardState extends State<AuthCard> {
|
||||
textInputAction: TextInputAction.next,
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
validator: (value) {
|
||||
if (value==null || value.isEmpty) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return AppLocalizations.of(context).invalidUsername;
|
||||
}
|
||||
if (!RegExp(r'^[\w.@+-]+$').hasMatch(value!)) {
|
||||
return AppLocalizations.of(context).usernameValidChars;
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
},
|
||||
inputFormatters: [FilteringTextInputFormatter.deny(RegExp(r'\s\b|\b\s'))],
|
||||
|
||||
Reference in New Issue
Block a user