update
This commit is contained in:
@@ -4,6 +4,7 @@ import 'package:firebase_storage/firebase_storage.dart';
|
|||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
@@ -641,11 +642,14 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
|||||||
TextFormField(
|
TextFormField(
|
||||||
controller: _nameController,
|
controller: _nameController,
|
||||||
maxLength: 50,
|
maxLength: 50,
|
||||||
|
inputFormatters: [
|
||||||
|
FilteringTextInputFormatter.deny(RegExp(r'\s{2,}')),
|
||||||
|
],
|
||||||
validator: (value) {
|
validator: (value) {
|
||||||
if (value == null || value.isEmpty) {
|
if (value == null || value.trim().isEmpty) {
|
||||||
return 'Porfavor ingrese un nombre.';
|
return 'Porfavor ingrese un nombre.';
|
||||||
}
|
}
|
||||||
if (value.length < 5) {
|
if (value.trim().length < 5) {
|
||||||
return 'Debe tener al menos 5 caracteres.';
|
return 'Debe tener al menos 5 caracteres.';
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user