Display error message in a forgot password section

I wanna display an error message in a forget password section and in the given link Account
I tried this code in terms of a solution but could not be able display error msg.

$(document).ready(function(){
 $('#customer_password'). on('focusout' ,function(){
   if($('#customer_password').value() != ""){
     
   } else {
      $('#customer_password').text('Password Required... !!');
        $('#customer_password').fadeIn('slow');
   }
   
 }
});
   function validatePassword(pVal) {
    
  var val=  /^[A-Za-z]\w{7,14}$/;
    if(val.test(pVal)) { 
     alert('Correct, try another...')
      return true;
      }
  else{ 
  alert('Wrong...!')
   return false;
  }

   }

whats your desire output here?! it might be useful for others to contemplate on this…

1 Like

I mean after trying the above solution i did not get error message which i wanna display.

is it possible to share a sandbox link to that?! cause its not clear to me where you want to show that error message and why it’s not showing up!!

Actually it’s my shopify-store. So won’t be able to share the sandbox.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.