screens/SignUp.js
/**
   * Helper function to check if password is valid or not
   * @param {string} password 
   * @returns 
   */
Helper function to check if password is valid or not
@param {string} password
@returns
Helper function to check if password is valid or not @param { string } password @returns
function passwordValid(password) {
    if(password.length < 6)
      return false;
    let containUppercase=false, containLowercase=false, containNumber=false;
    let curr = '';
    for(let i=0; i<password.length; i++){
      if(containUppercase && containLowercase && containNumber)
        break;
      curr = password[i]
      if((/[1-9]/).test(curr))
        containNumber = true;
      else {
        if((/[a-z]/).test(curr))
          containLowercase = true;
        else if((/[A-Z]/).test(curr))
          containUppercase = true;
      }
    }
    return containUppercase && containLowercase && containNumber; 
  }
function passwordValid ( password ) { if ( password . length < 6 ) return false ; let containUppercase = false , containLowercase = false , containNumber = false ; let curr = '' ; for ( let i = 0 ; i < password . length ; i ++ ) { if ( containUppercase && containLowercase && containNumber ) break ; curr = password [ i ] if ( ( / [1-9] / ) . test ( curr ) ) containNumber = true ; else { if ( ( / [a-z] / ) . test ( curr ) ) containLowercase = true ; else if ( ( / [A-Z] / ) . test ( curr ) ) containUppercase = true ; } } return containUppercase && containLowercase && containNumber ; }
Helper function to check if password is valid or not
 @param {string} password
 @returns
Helper function to check if password is valid or not @param { string } password @returns