pinCodeValidate method

bool pinCodeValidate({
  1. required String content,
})

This Method will validate your content from Pin Code Format. content Content is a Required parameter. Pass your inputed or that value which you want to compare with Pic Code format.

Implementation

bool pinCodeValidate({required String content}) {
    if (content.length != 6) {
      return false;
    } else {
      return RegExp(r"^[0-9][6]").hasMatch(content);
    }
  }