private boolean valiDateInput(){
       
    if(regnameText.getText().trim().length()==0){
             JOptionPane.showMessageDialog(this, "Name can not be blank");
         return false;
     }
   
    else if(regcontactNumberText.getText().trim().length()!=10){
                JOptionPane.showMessageDialog(this, "Contact Must be of 10 digit numeric value");
                return false;
     }
         
    else if(!Pattern.matches(NUMBER_PATTERN, regcontactNumberText.getText())){
        JOptionPane.showMessageDialog(this, "Contact Must be of 10 digit numeric value");
                return false;
     }
    else if((regemaillText.getText().trim().length()==0)){
        JOptionPane.showMessageDialog(this, "Email can not be blank");
       return false;
    }
    else if(!Pattern.matches(EMAIL_PATTERN, regemaillText.getText())){
         JOptionPane.showMessageDialog(this, "Please Enter Valid Emial Id ");
       return false;
     }
   
         
   else if( regaddressText.getText().trim().length()==0){
        JOptionPane.showMessageDialog(this, "Address can not be blank");
       return false;
    }
    
    else if(regimageLabel.getIcon()==null){
           JOptionPane.showMessageDialog(this, "Password can not be blank");
         return false;
     }
     return true;
   }