validateStructure method

bool validateStructure(
  1. String value
)

Implementation

bool validateStructure(String value) {
  String pattern = r'^(?=.*?[A-Za-z])(?=.*?[0-9]).{8,}$';
  RegExp regExp = new RegExp(pattern);
  isPasswordWrong = !regExp.hasMatch(value);
  setState(() {});
  return regExp.hasMatch(value);
}