mirror of
https://github.com/jagandeepbrar/lunasea.git
synced 2026-08-31 12:42:34 +00:00
chore: refactor and cleanup of system services
This commit is contained in:
12
lib/utils/validator.dart
Normal file
12
lib/utils/validator.dart
Normal file
@@ -0,0 +1,12 @@
|
||||
import 'package:lunasea/vendor.dart';
|
||||
|
||||
class LunaValidator {
|
||||
const LunaValidator._();
|
||||
|
||||
bool email(String email) {
|
||||
const regex = r"(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)";
|
||||
return RegExp(regex).hasMatch(email);
|
||||
}
|
||||
}
|
||||
|
||||
final validatorProvider = Provider((_) => const LunaValidator._());
|
||||
Reference in New Issue
Block a user