hi how can i do this pl/sql validation in java

IF tuser is null then
 message ('Field must be entered');
 raise form_trigger_failure;
END IF;

IF substr(tuser,1,1) = 'N' THEN
   IF NVL(length(tuser), 0)!= 14 THEN 
      message ('social security must be 13 characters long');
      raise form_trigger_failure;
   END IF;
END IF;
IF substr(tsuser,1,1) = 'K' THEN
   IF substr(Tuser,10,1) != ' ' THEN
      message ('The socia Number must be 8 characters long');
      raise form_trigger_failure;
  END IF;
END IF;
/**********************************************************************/
/*Validate that the entered user or password is not locked or expired */
/**********************************************************************/

                               i what something like this

 

public void emailValidator(FacesContext facesContext, UIComponent uIComponent, Object object) {
         if(object!=null){
 
             String name=object.toString();
             String expression="^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$";
             CharSequence inputStr=name;
             Pattern pattern=Pattern.compile(expression);
             Matcher matcher=pattern.matcher(inputStr);
             String msg="Email is not in Proper Format";
             if(matcher.matches()){
               
             }
 
             else{
                 throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,msg,null));
             }
         }
     }

am in oracle jdeveloper using adf

FacebookTwitterLinkedin
Pin It
Joomla Tutorials for Beginners