6/25/1
This commit is contained in:
@@ -7,7 +7,7 @@ import 'package:get_storage/get_storage.dart';
|
||||
import '../../constant/colors.dart';
|
||||
|
||||
class MyTextForm extends StatelessWidget {
|
||||
const MyTextForm({
|
||||
MyTextForm({
|
||||
super.key,
|
||||
required this.controller,
|
||||
required this.label,
|
||||
@@ -47,6 +47,11 @@ class MyTextForm extends StatelessWidget {
|
||||
if (value!.isEmpty) {
|
||||
return '${'Please enter'.tr} $label.'.tr;
|
||||
}
|
||||
if (label.contains("Insert card number".tr)) {
|
||||
if (value.length != 16) {
|
||||
return "Please enter a valid card 16-digit number.".tr;
|
||||
}
|
||||
}
|
||||
|
||||
if (type == TextInputType.emailAddress) {
|
||||
if (!value.contains('@')) {
|
||||
|
||||
Reference in New Issue
Block a user