static bool isDobValid(String dob) { final RegExp dobRegExp = RegExp( r"^(0[1-9]|[12][0-9]|3[01])/(0[1-9]|1[0-2])/[0-9]{4}$" ); return dobRegExp.hasMatch(dob); }