import 'package:intl/intl.dart'; class ValidatorUtil { static bool isValidEmail(String email) { if (RegExp(r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$').hasMatch(email)) { return true; } else { return false; } } static bool isValidPassword(String password) { if (password.length >= 8) { return true; } else { return false; } } static String toISO8601(String format, String value) { DateFormat dateFormat = DateFormat(format); DateTime dateTime = dateFormat.parse(value); return dateTime.toIso8601String(); } }