passwordStructure method

bool passwordStructure(
  1. String value
)

Validates if the password meets the specified criteria.

Implementation

bool passwordStructure(String value) {
  String pattern =
      r'^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[!@#\$&*~]).{8,}$';
  RegExp regExp = RegExp(pattern);
  return regExp.hasMatch(value);
}