mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-08-26 08:49:39 +00:00
Compare commits
1 Commits
09dc8cc330
...
SP-349-fe-
Author | SHA1 | Date | |
---|---|---|---|
dd55d5c082 |
@ -569,8 +569,7 @@ class HomeCubit extends Cubit<HomeState> {
|
||||
// defaultBottomNavBarItem(icon: Assets.assetsIconsDashboard, label: 'Dashboard'),
|
||||
// defaultBottomNavBarItem(icon: Assets.assetsIconslayout, label: 'Layout'),
|
||||
defaultBottomNavBarItem(icon: Assets.assetsIconsDevices, label: 'Devices'),
|
||||
defaultBottomNavBarItem(
|
||||
icon: Assets.assetsIconsRoutines, label: 'Automation'),
|
||||
defaultBottomNavBarItem(icon: Assets.assetsIconsRoutines, label: 'Routine'),
|
||||
defaultBottomNavBarItem(icon: Assets.assetsIconsMenu, label: 'Menu'),
|
||||
];
|
||||
|
||||
@ -617,6 +616,7 @@ BottomNavigationBarItem defaultBottomNavBarItem(
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// class PermissionUtils {
|
||||
// // Check if the "VIEW" permission exists in "MANAGE_SUBSPACE"
|
||||
// static bool hasViewPermission(List<dynamic> permissions) {
|
||||
|
@ -262,6 +262,17 @@ class ProfileBloc extends Bloc<ProfileEvent, ProfileState> {
|
||||
if (parts.any((part) => part.length < 2 || part.length > 30)) {
|
||||
return 'Full name parts must be between 2 and 30 characters long';
|
||||
}
|
||||
if (RegExp(r"\s{2,}").hasMatch(value)) {
|
||||
return 'Only one space is allowed between first and last names';
|
||||
}
|
||||
// Check for leading or trailing spaces
|
||||
if (value != value.trim()) {
|
||||
return 'No leading or trailing spaces allowed';
|
||||
}
|
||||
// Check if only alphabetic characters and one space are used
|
||||
if (!RegExp(r'^[A-Za-z]+(?: [A-Za-z]+)?$').hasMatch(value)) {
|
||||
return 'Only alphabetic characters and a single space are allowed';
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@ class StringsManager {
|
||||
|
||||
static const String dashboard = 'Dashboard';
|
||||
static const String devices = 'Devices';
|
||||
static const String routine = 'Automation';
|
||||
static const String routine = 'Routines';
|
||||
static const String tapToRunRoutine = 'Tap to run routine';
|
||||
static const String wizard = 'Wizard';
|
||||
static const String active = 'Active';
|
||||
|
Reference in New Issue
Block a user