Regarding characters validation

Dear All i ma using 10G.
I am writing this query for character validation ..
Select TRANSLATE( lstring, '$ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789/-?:().,''+{}', '$') FROM dual;
It is working fine ..
Now i created a table and save (ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789/-?:().,''+{}') this in that table .
But in my plsql block i am trying to fetch INTO a variable but it is not working properly ..
I mean it is coming extra $$$ ....
Begin
Select SWIFT_FOR_ACCOUNT into lcode
from MU_PAY_PARAM_VALIDATOR
Where rownum = 1;
Select TRANSLATE(lac_no, lcode,'$') into ochar
FROM dual;
If ochar is null then
Null ;
Else
Dbms_output.put_line('There are extra characters exit in the account no , like :-'||ochar );
Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0021','Invalid account number');
Commit;
End if;
Exception
When NO_Data_Found Then
null;
End;
So how to do this ?

Hi,
LuKKa wrote:
I am writing this query for character validation ..
Select TRANSLATE( 'SAND123', '$ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789/-?:().,''+{}', '$') FROM dual;
Then it is working fine . Means if the string is comes within the characters then it should return null else it should return the character which is not in the list ..
for example : I am passing SAN123/-? then it should return Null , that means it is correct .Remember how TRANSLATE (s, f, t) works: it returns a copy of s with the nth character of f replaced by the nth character of t. If LENGTH (T) < n, then it replaces the nth character of f with NULL, or removes it.
Let's format your expression to make this more clear:
TRANSLATE ( 'SAND123'
          , '$ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789/-?:().,''+{}'
          , '$'
          )The expression above is "trtanslating" '$' to '$, and translating all the other characters of f ('A', 'B', 'C', ..., '}') to nothing.
Now i am passing this :- SAN123/-?>< Then it should return >< . It is wrong data .
But same thing i want to in PLSQL ..Then do the same thing in PL/SQL; use the same f argument that you are using outside of PL/SQL.
For that i have created a table tab1 with this column COL1 .
And in this column i have stored this value ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789/-?:().,''+{}
So what you're doing is equivalent to
TRANSLATE ( 'SAN123/-?>'    -- There's another character at the end of this string, but it causes this site to display incorrectly
          , 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789/-?:().,''+{}'
          , '$'
          )This is translating all the 'A's to '$'s, and all the other characters in t ('B', 'C', 'D', ..., '}') to nothing.
Add a '$' to the beginning of lcode.

Similar Messages

  • Need help regarding form validation

    Hi all,
    I have particular doubt regarding form validation. I have a form based on a table. ( One data block ) . I have a function in program unit which return boolean value based on some conditions. I will be calling this function in block validate trigger.
    What i need is , if function return false i need to stop any insertion,updation action that's going to be done by forms.( point to control insertion and updation)
    I don't want to use form triggure failure builtin. What should i do ? plz guide
    regards

    what are you going to do stop insert/update upon commit?
    -- use on-insert trigger
    if allowed_to_insert then
    insert_record;
    end if;
    -- use on-update trigger
    if allowed_to_update then
    update_record;
    end if;
    if when entering data, you might want to check set_block_property

  • Regarding the validations in File Upload.

    Hi
    I am Using the X:InputFileUpload> for uploading of the my file and i am using validator class for checking the validation like if the file name is null. But i need one more validation to check the file format like if i have enter any special characters and invalid file format(SSS) i want give a message to the user.
    Please suggest me how can i approach using Myfaces.
    Thanks in advance.
    Regards
    Satish

    I have never used myfaces implementation but I am sure you can just define your own custom validator and attach it to this component or assign a method binding to its validator attribute to perform extra validation.

  • Special Characters Validations

    Hi, I need to write a validation that will give an error when user enters any funny characters e.g @, $ and about 300 more since we have multiple langueu2019s.
    Currently I have the following working validation;
    HAS_ANY_CHAR(Field Name,"@","$")=False
    What I want to know is if there are an easier way to achieve my goal of blacking the non valid characters we identified?
    Any help will be appreciated.

    Hi Chris,
    In data manager in match mode
    In Trasformation tab we remove special characters using TOKENS
    right click transfermation pane create name like "remove -"
    ex: AB-PQR-D, we don't want to "-" replace to ABPQRD
    Under TOKENS: 
                   FROM                                     TO
                   "-"                                          keep emty place
    In RULE tab give for FIELD: whatever name given in transformation: "remove -"
    In strategies pane will give rule name.
    select the duplicate records in record pane, right click press match tab, select the check box
    go to merge tab merge the records.
    OUTPUT: ABPQRD and merge the others into one record.
    Regards
    Bhupal.

  • Regarding Certification validity

                       Hi Friends,
    I have completed CCNP Data R&S in OCT 2012. IS there any timeframe for tshoot to be completed within so and so or as each certification has 3years of validity whether i can complete the same before SEP 2015. will it be valid.
    OR
    If i do some other certification in security and wireless in feb 2014.... my certification validity will extend to jan 2017 right. before Jan 2017 can i complete Tshoot ot within 3 years of R&S certifications i have to get it certified CCNP.
    Please clarify... i asked many and no one could able to clarify this.
    Thanks & Regards,
    Naveen

    Sandeep:
    Either you misunderstood, or is not quite right for you said:
    According to the link you include in your own post:
    CISCO: "...
    Placing expiration dates on exams ensures that candidates starting a multi-exam certification such as CCENT, CCNA Routing and Switching, or CCDP, for example, complete the program within a specified time frame. By passing all of the required exams within the specified time period as noted above, candidates demonstrate that they are tested on current content. In situations where the period exceeds three years, candidates will need to retake those exams that expire."
    So I understand that in the case of the CCNP, you have to pass 3 exams that comprise, within the single period of 3 years that you passed the last exam Cisco (CCNA, ...)

  • Regarding this Validation Error   JBO-29000

    Hi, I am using JDeveloper 10.1.2.1.0. when i run the page i am getting this error. can any one help me in this.plzzz
    Validation Error
    You must correct the following error(s) before proceeding:
    JBO-29000: Unexpected exception caught: java.lang.ClassCastException, msg=oracle.jbo.common.ws.WSViewObjectImpl
    oracle.jbo.common.ws.WSViewObjectImpl
    regards
    Nag
    Message was edited by:
    user477479

    JBO-29000: JboException
    Cause: If an unexpected exception occurs during a framework operation, this exception is thrown, with the unexpected exception included in the details of this exception.
    Action: Fix the cause for the exception in the details for this JboException.
    You probably need to narrow this down a bit more...is this happening on all pages? has it just started happening? Does it happpen in a simple test case. If you can narrow that down you will have a better chance of getting a solution.
    Regards
    Grant Ronald
    Oracle Product Management

  • Regarding LSMW validation & Debuging

    Hi,
    Is it possible to perform validations in LSMW?
    If yes, kindly send me detailed description.
    Waht is the procedure to debug LSMW?
    Thanks & Regards,
    sathish dasari.

    Yes, it is possible to perform the validations in LSMW.
    In the 5th step(Maintain field mapping), we have various processing blocks like Global data, begin of processing, begin of transaction, begin of record. You will get an abap screen when double click on the required block. write the what ever the code required for validations(like norma se38 program).
    suppose if you find that the record is an erroneous, skip that record for processing (there is global function available in lsmw skip_transaction), then populate all such error records into one internal table, and you can download the same in end of processing block.
    For every lsmw a conversion program will be generated, you can see the same by selecting the display conversion program in user menu.
    put the break-point where ever required, it will be triggered duting the convert data step.
    Thanks,
    Rajinikanth

  • David Powers --- Regarding form validation with dreamweaver behaviors

    I am in the chapter teaching about form validation with the Zend Framework. I have done the entire lesson with the lesson files and everything works perfectly...
    but I went back to use the form valdation techniques for my own site and it is not working properly. In the book, Chapter 6 teaches how to create a user login and editing the database through the site. But in chapter seven the form validation does not build on top of this and therefore does not teach how to integrate the form validation with the registered user already set up.
    I have user registration completly working on my site and everything runs fine. I am trying to add the form validation but it is all completly ignored. When I leave a field blank it simply takes me to another blank page that reads "Column 'first_name' cannot be null"
    here is index.php code...
    <?php require_once('Connections/CSSU_Write.php'); ?>
    <?php require_once('Connections/CSSU_Read.php'); ?>
    <?php require_once('script/user_registration.php');
    ?>
    <?php
    if (isset($_POST['password'])) {
              $_POST['password'] = sha1($_POST['password']);
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
      $insertSQL = sprintf("INSERT INTO sign_up (first_name, family_name, user_email, password, gender, bday_month, bday_day, bday_year) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)",
                           GetSQLValueString($_POST['first_name'], "text"),
                           GetSQLValueString($_POST['last_name'], "text"),
                           GetSQLValueString($_POST['email'], "text"),
                           GetSQLValueString($_POST['password'], "text"),
                           GetSQLValueString($_POST['gender'], "text"),
                           GetSQLValueString($_POST['bday_month'], "text"),
                           GetSQLValueString($_POST['bday_day'], "text"),
                           GetSQLValueString($_POST['bday_year'], "text"));
      mysql_select_db($database_CSSU_Write, $CSSU_Write);
      $Result1 = mysql_query($insertSQL, $CSSU_Write) or die(mysql_error());
      $insertGoTo = "login.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
        $insertGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $insertGoTo));
    ?>
    <?php
    // *** Validate request to login to this site.
    if (!isset($_SESSION)) {
      session_start();
    $loginFormAction = $_SERVER['PHP_SELF'];
    if (isset($_GET['accesscheck'])) {
      $_SESSION['PrevUrl'] = $_GET['accesscheck'];
    if (isset($_POST['email'])) {
      $loginUsername=$_POST['email'];
      $password=$_POST['password'];
      $MM_fldUserAuthorization = "";
      $MM_redirectLoginSuccess = "logoOutRedirect.php";
      $MM_redirectLoginFailed = "logoOutRedirect.php";
      $MM_redirecttoReferrer = false;
      mysql_select_db($database_CSSU_Write, $CSSU_Write);
      $LoginRS__query=sprintf("SELECT user_email, password FROM sign_up WHERE user_email=%s AND password=%s",
        GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
      $LoginRS = mysql_query($LoginRS__query, $CSSU_Write) or die(mysql_error());
      $loginFoundUser = mysql_num_rows($LoginRS);
      if ($loginFoundUser) {
         $loginStrGroup = "";
              if (PHP_VERSION >= 5.1) {session_regenerate_id(true);} else {session_regenerate_id();}
        //declare two session variables and assign them
        $_SESSION['MM_Username'] = $loginUsername;
        $_SESSION['MM_UserGroup'] = $loginStrGroup;               
        if (isset($_SESSION['PrevUrl']) && false) {
          $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
        header("Location: " . $MM_redirectLoginSuccess );
      else {
        header("Location: ". $MM_redirectLoginFailed );
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>CSSU</title>
    <link href="styles.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div class="container">
      <div class="header">
      <div class="logo">
                <a href="index.php">
                  <h1/>
            .CSSU { UNIVERSITY; }
            </h1>
            <h2>
            <code><<code>!</code>-- Learn/Apply/Master --></code>
            </h2>
        </a>
      </div> 
        <!-- end .header --></div>
        <div class="headerBar">
        <div id="nav">
                  <ul id="links">
                      <a href="#"><li>CSSU</li></a>
                      <a href="#"><li>Classes</li></a>
                      <a href="#"><li>Pricing</li></a>
                      <a href="#"><li>Degree</li></a>
                  </ul>
        </div>
        <form name="form2" method="POST" action="<?php echo $loginFormAction; ?>" class="form2">
        <p>
            <label for="email" id="email" class="loginLabel">Email:</label>
            <input type="email" name="email" class="loginField" />
            <label for="password" id="password" class="loginLabel">Password:</label>
            <input type="password" name="password" class="loginField" />
                  <input type="submit" value="Log In" name="submit" class="submit login" />
        </p>
        </form>
        </div>
      <div class="container2">
      <div class="sidebar1">
        <h1>Sign Up</h1>
        <h2>Earn an Official CSS Masters Certification!</h2>
        <table>
        <form name="form1" method="POST" action="<?php echo $editFormAction; ?>" class="form1">
        <tr >
            <td class="formLabel"><label for="firstName" id="firstNameLabel" >First Name:</label>
                      <span>
                         <?php
                                  if ($_POST && isset($errors['first_name'])) {
                                            echo $errors['first_name'];
                                  ?>
                </span>
            </td>
            <td><input type="text" name="first_name" class="inputField" id="firstName" /></td>
        </tr>
        <tr>
            <td class="formLabel"><label for="lastName" id="lastName" >Last Name:</label></td>
            <td><input type="text" name="last_name" class="inputField" /></td>
        </tr>
        <tr>
            <td class="formLabel"><label for="yourEmail" id="yourEmail" >Your Email:</label></td>
            <td><input type="user_email" name="email" class="inputField" /></td>
        </tr>
        <tr>
            <td class="formLabel"><label for="yourEmail2" id="yourEmail2">Re-enter Email:</label></td>
            <td><input type="email" name="reEnter_email" class="inputField" /></td>
        </tr>
        <tr>
            <td class="formLabel"><label for="password" id="password">New Password:</label></td>
            <td><input type="password" name="password" class="inputField" /></td>
        </tr>   
        <tr>
            <td class="formLabel"><label for="gender" id="gender" class="formLabel">I am:</label></td>
          <td><select name="gender" class="selectMenu selectMenu1 gender">
              <option value="select">Select Sex:</option>
              <option value="male" name="male">Male</option>
              <option value="female" name="female">Female</option>
                        </select>
          </td>
              </tr>
               <tr>
            <td class="formLabel"><label for="bday">Birthday:</label></td>
               <td>
            <select name="bday_month" class="selectMenu selectMenu1 bday">
              <option value="male">Month:</option>
              <option value="January">January</option>
            </select>
    <select name="bday_day" class="selectMenu bday">
              <option value="Day">Day:</option>
              <option value="1">1</option>
                        </select>
    <select name="bday_year" class="selectMenu bday">
              <option value="Year">Year:</option>
            </select>
         </td>
        </tr>
        <tr>
                  <td class="submitTd" colspan="2"><input type="submit" value="Sign Up" name="submit" class="submit signup" /><td>
        </tr>
        <input type="hidden" name="MM_insert" value="form1" />
        </form>
        </table>
        <!-- end .sidebar1 --></div>
      <div class="content">
        <h1>CSSU</h1>
        <!-- end .content --></div>
      <div class="footer">
        <!-- end .footer --></div>
        </div> <!-- end container2 -->
      <!-- end .container --></div>
    </body>
    </html>
    And here is user_registration.php code just for the first_name field...
    <?php
    $errors = array();
    if ($_POST) {
      // run the validation script
      require_once('library.php');
      try {
              // main script goes here
              $val = new Zend_Validate_Regex('/^[a-z]+[-\'a-z ]+$/i');
              if (!$val->isValid($_POST['first_name'])) {
                $errors['first_name'] = 'Required field, no numbers';
      } catch (Exception $e) {
              echo $e->getMessage();
    And from here, here is the library.php code....
    <?php
    $library = '.../html/zend/library';
    set_include_path(get_include_path() . PATH_SEPARATOR . $library);
    require_once('Zend/Loader/Autoloader.php');
    try {
    Zend_Loader_Autoloader::getInstance();
      $write = array('host'     => 'hostname',
                                             'username' => 'cssu',
                                             'password' => 'password',
                                             'dbname'   => 'cssu');
      $read  = array('host'     => 'hostname',
                                             'username' => 'cssu',
                                             'password' => 'password',
                                             'dbname'   => 'cssu');
      // Comment out the next two lines if using mysqli
      // and remove the comments from the last two lines
      $dbWrite = new Zend_Db_Adapter_Pdo_Mysql($write);
      $dbRead = new Zend_Db_Adapter_Pdo_Mysql($read);
      //$dbWrite = new Zend_Db_Adapter_Mysqli($write);
      //$dbRead = new Zend_Db_Adapter_Mysqli($read);
    } catch (Exception $e) {
              echo $e->getMessage();
    I replaced some code here to protect myself, but the library.php file is completely functional and has been tested... I am sure the problem ins't in here.
    Please let me know if you need any further code to help you out. I am brand new to PHP and so far everything has ran smoothly up til now. I have my Zend Framework uploaded to my server and tested that my site is connecting to it properly. Any help on this would be so so awesome! This is for a school project and I can't move on until this is resolved! Thank you so much for trying!
    You can also view the issue at my website... all the files have been uploaded to the server. www.CSSU.com

    I am in the chapter teaching about form validation with the Zend Framework. I have done the entire lesson with the lesson files and everything works perfectly...
    but I went back to use the form valdation techniques for my own site and it is not working properly. In the book, Chapter 6 teaches how to create a user login and editing the database through the site. But in chapter seven the form validation does not build on top of this and therefore does not teach how to integrate the form validation with the registered user already set up.
    I have user registration completly working on my site and everything runs fine. I am trying to add the form validation but it is all completly ignored. When I leave a field blank it simply takes me to another blank page that reads "Column 'first_name' cannot be null"
    here is index.php code...
    <?php require_once('Connections/CSSU_Write.php'); ?>
    <?php require_once('Connections/CSSU_Read.php'); ?>
    <?php require_once('script/user_registration.php');
    ?>
    <?php
    if (isset($_POST['password'])) {
              $_POST['password'] = sha1($_POST['password']);
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
      $insertSQL = sprintf("INSERT INTO sign_up (first_name, family_name, user_email, password, gender, bday_month, bday_day, bday_year) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)",
                           GetSQLValueString($_POST['first_name'], "text"),
                           GetSQLValueString($_POST['last_name'], "text"),
                           GetSQLValueString($_POST['email'], "text"),
                           GetSQLValueString($_POST['password'], "text"),
                           GetSQLValueString($_POST['gender'], "text"),
                           GetSQLValueString($_POST['bday_month'], "text"),
                           GetSQLValueString($_POST['bday_day'], "text"),
                           GetSQLValueString($_POST['bday_year'], "text"));
      mysql_select_db($database_CSSU_Write, $CSSU_Write);
      $Result1 = mysql_query($insertSQL, $CSSU_Write) or die(mysql_error());
      $insertGoTo = "login.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
        $insertGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $insertGoTo));
    ?>
    <?php
    // *** Validate request to login to this site.
    if (!isset($_SESSION)) {
      session_start();
    $loginFormAction = $_SERVER['PHP_SELF'];
    if (isset($_GET['accesscheck'])) {
      $_SESSION['PrevUrl'] = $_GET['accesscheck'];
    if (isset($_POST['email'])) {
      $loginUsername=$_POST['email'];
      $password=$_POST['password'];
      $MM_fldUserAuthorization = "";
      $MM_redirectLoginSuccess = "logoOutRedirect.php";
      $MM_redirectLoginFailed = "logoOutRedirect.php";
      $MM_redirecttoReferrer = false;
      mysql_select_db($database_CSSU_Write, $CSSU_Write);
      $LoginRS__query=sprintf("SELECT user_email, password FROM sign_up WHERE user_email=%s AND password=%s",
        GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
      $LoginRS = mysql_query($LoginRS__query, $CSSU_Write) or die(mysql_error());
      $loginFoundUser = mysql_num_rows($LoginRS);
      if ($loginFoundUser) {
         $loginStrGroup = "";
              if (PHP_VERSION >= 5.1) {session_regenerate_id(true);} else {session_regenerate_id();}
        //declare two session variables and assign them
        $_SESSION['MM_Username'] = $loginUsername;
        $_SESSION['MM_UserGroup'] = $loginStrGroup;               
        if (isset($_SESSION['PrevUrl']) && false) {
          $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
        header("Location: " . $MM_redirectLoginSuccess );
      else {
        header("Location: ". $MM_redirectLoginFailed );
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>CSSU</title>
    <link href="styles.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div class="container">
      <div class="header">
      <div class="logo">
                <a href="index.php">
                  <h1/>
            .CSSU { UNIVERSITY; }
            </h1>
            <h2>
            <code><<code>!</code>-- Learn/Apply/Master --></code>
            </h2>
        </a>
      </div> 
        <!-- end .header --></div>
        <div class="headerBar">
        <div id="nav">
                  <ul id="links">
                      <a href="#"><li>CSSU</li></a>
                      <a href="#"><li>Classes</li></a>
                      <a href="#"><li>Pricing</li></a>
                      <a href="#"><li>Degree</li></a>
                  </ul>
        </div>
        <form name="form2" method="POST" action="<?php echo $loginFormAction; ?>" class="form2">
        <p>
            <label for="email" id="email" class="loginLabel">Email:</label>
            <input type="email" name="email" class="loginField" />
            <label for="password" id="password" class="loginLabel">Password:</label>
            <input type="password" name="password" class="loginField" />
                  <input type="submit" value="Log In" name="submit" class="submit login" />
        </p>
        </form>
        </div>
      <div class="container2">
      <div class="sidebar1">
        <h1>Sign Up</h1>
        <h2>Earn an Official CSS Masters Certification!</h2>
        <table>
        <form name="form1" method="POST" action="<?php echo $editFormAction; ?>" class="form1">
        <tr >
            <td class="formLabel"><label for="firstName" id="firstNameLabel" >First Name:</label>
                      <span>
                         <?php
                                  if ($_POST && isset($errors['first_name'])) {
                                            echo $errors['first_name'];
                                  ?>
                </span>
            </td>
            <td><input type="text" name="first_name" class="inputField" id="firstName" /></td>
        </tr>
        <tr>
            <td class="formLabel"><label for="lastName" id="lastName" >Last Name:</label></td>
            <td><input type="text" name="last_name" class="inputField" /></td>
        </tr>
        <tr>
            <td class="formLabel"><label for="yourEmail" id="yourEmail" >Your Email:</label></td>
            <td><input type="user_email" name="email" class="inputField" /></td>
        </tr>
        <tr>
            <td class="formLabel"><label for="yourEmail2" id="yourEmail2">Re-enter Email:</label></td>
            <td><input type="email" name="reEnter_email" class="inputField" /></td>
        </tr>
        <tr>
            <td class="formLabel"><label for="password" id="password">New Password:</label></td>
            <td><input type="password" name="password" class="inputField" /></td>
        </tr>   
        <tr>
            <td class="formLabel"><label for="gender" id="gender" class="formLabel">I am:</label></td>
          <td><select name="gender" class="selectMenu selectMenu1 gender">
              <option value="select">Select Sex:</option>
              <option value="male" name="male">Male</option>
              <option value="female" name="female">Female</option>
                        </select>
          </td>
              </tr>
               <tr>
            <td class="formLabel"><label for="bday">Birthday:</label></td>
               <td>
            <select name="bday_month" class="selectMenu selectMenu1 bday">
              <option value="male">Month:</option>
              <option value="January">January</option>
            </select>
    <select name="bday_day" class="selectMenu bday">
              <option value="Day">Day:</option>
              <option value="1">1</option>
                        </select>
    <select name="bday_year" class="selectMenu bday">
              <option value="Year">Year:</option>
            </select>
         </td>
        </tr>
        <tr>
                  <td class="submitTd" colspan="2"><input type="submit" value="Sign Up" name="submit" class="submit signup" /><td>
        </tr>
        <input type="hidden" name="MM_insert" value="form1" />
        </form>
        </table>
        <!-- end .sidebar1 --></div>
      <div class="content">
        <h1>CSSU</h1>
        <!-- end .content --></div>
      <div class="footer">
        <!-- end .footer --></div>
        </div> <!-- end container2 -->
      <!-- end .container --></div>
    </body>
    </html>
    And here is user_registration.php code just for the first_name field...
    <?php
    $errors = array();
    if ($_POST) {
      // run the validation script
      require_once('library.php');
      try {
              // main script goes here
              $val = new Zend_Validate_Regex('/^[a-z]+[-\'a-z ]+$/i');
              if (!$val->isValid($_POST['first_name'])) {
                $errors['first_name'] = 'Required field, no numbers';
      } catch (Exception $e) {
              echo $e->getMessage();
    And from here, here is the library.php code....
    <?php
    $library = '.../html/zend/library';
    set_include_path(get_include_path() . PATH_SEPARATOR . $library);
    require_once('Zend/Loader/Autoloader.php');
    try {
    Zend_Loader_Autoloader::getInstance();
      $write = array('host'     => 'hostname',
                                             'username' => 'cssu',
                                             'password' => 'password',
                                             'dbname'   => 'cssu');
      $read  = array('host'     => 'hostname',
                                             'username' => 'cssu',
                                             'password' => 'password',
                                             'dbname'   => 'cssu');
      // Comment out the next two lines if using mysqli
      // and remove the comments from the last two lines
      $dbWrite = new Zend_Db_Adapter_Pdo_Mysql($write);
      $dbRead = new Zend_Db_Adapter_Pdo_Mysql($read);
      //$dbWrite = new Zend_Db_Adapter_Mysqli($write);
      //$dbRead = new Zend_Db_Adapter_Mysqli($read);
    } catch (Exception $e) {
              echo $e->getMessage();
    I replaced some code here to protect myself, but the library.php file is completely functional and has been tested... I am sure the problem ins't in here.
    Please let me know if you need any further code to help you out. I am brand new to PHP and so far everything has ran smoothly up til now. I have my Zend Framework uploaded to my server and tested that my site is connecting to it properly. Any help on this would be so so awesome! This is for a school project and I can't move on until this is resolved! Thank you so much for trying!
    You can also view the issue at my website... all the files have been uploaded to the server. www.CSSU.com

  • Regarding Strtuts validation.xml

    Hi,
    I want to validate name filed.i won't accept special character.but it will accept whitespace.(now it's not accepting whitespace)
    the following things i mentioned in Valitaiotn.xml
    <form name="backgroundQuestionForm">
    <field property="name" depends="required,mask">
    <msg name="required" key="errors.invalid"/>
         <arg key="bgQuestiongroup.name"/>
         <var>
    <var-name>mask</var-name>
    <var-value>^[0-9a-zA-Z]*$</var-value>
    </var>
    </field>
    </form>
    I have to know how to mentioned whitespace in mask
    for eg: in name field 'john jayaraj' .here whitepace is there in b/w john and jayaraj.
    Plz help me in this regards,
    Regards,
    John Jayaraj,
    Mobile:+91 9865315105

    Hi,
    try this - update your target msg xsd in your XI folder........rerun your scenario and see if this error is still there..........
    if this error remains same, then in IR in data type, remove your pattern and just keep dateTime as datatype.......again update your xsd in XI folder.........rerun your scenario.
    Regards,
    Rajeev Gupta

  • Regarding input validation

    Hy to all,
               we are taking purchase order no from  user and  want to validate the user input.
    Can some one tell me how to implement validation....
    thanks in advance

    Hi,
    Pls check things like
    http://www.w3schools.com/js/js_form_validation.asp
    http://www.developertutorials.com/tutorials/javascript/javascript-form-validation-correction-050412/page1.html
    http://www.yourhtmlsource.com/javascript/formvalidation.html
    Eddy

  • Regarding schema validation and dbms_xmlparser, dbms_xmldom

    Hi All,
    Recently I came across one scenario, where I need to register XSD and validate all incoming xml agaist registered XSD and then access its contents and process them as per business needs.
    To accomplish this:
    1. Simply I have registered XSD using registerschema+ .
    2. To validate xmls, used schemaValidate+ .
    3. Once this is done then to fetch value from xml, I used below statement:
    SELECT EXTRACTVALUE (COLUMN_VALUE, '/details/emp_id') "Employee_ID"
    FROM TABLE
    +(XMLSEQUENCE+
    +(XMLTYPE+
    +('<?xml version="1.0"?>+
    +<employee>+
    +<details>+
    +<emp_id>1001</emp_id>+
    +</details>+
    +</employee>'+
    +).EXTRACT ('/employee/details')+
    +)+
    +) t;+
    This works fine.
    But I was browsing the same requirement over forum, got solutions related to DBMS_XMLPARSER and DBMS_XMLDOM.
    I tried to go through its details but didnt get much idea on the same.
    Can anyone please help me to understand about use of dbms_xmlparser and dbms_xmldom and about DOM.
    In which scenario we need to use them?
    Thanks
    Vikram

    Where I was thinking with that sentence is the "streaming evaluation" that Oracle now offers. This option is available when XML is stored in an XMLType column of SECUREFILE BINARY format (introduced in 11.1.0.6 and default for XMLType columns in 11.2.0.2) and that data is queried/accessed.
    You can find some information on it here
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28369/xdb01int.htm
    (Search for "streaming")
    and here as well
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28369/xdb_xquery.htm#CBAIIEFG
    Streaming is basically reading the data as Oracle scans past it since it knows, based on the binary storage format, what the XML looks like, so it does not need to create the whole document to find the sections the XPath/XQuery specifies. You can see that a SQL statement is using streaming evaluation when "XPATH EVALUATION" shows up in the explain plan as shown by
    {message:id=10737315}
    This option is only available when the XML is stored in the DB in the correct format. If the XML is stored in a PL/SQL variable, Oracle cannot use streaming evaluation on it.

  • 'Invalid Characters' validation

    Hi,
    I've got a form that I have managed to validate using the dreamweaver 'tag inspectors'. What I want to do though is validate one of the text fields so that users can't type in spaces etc.
    I can post either the form code or the php if needed.
    Thank you.

    Read only textarea:
    HTML:
    <textarea name="read-only-text" cols="20" rows="2" readonly="readonly">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</textarea>
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • Validation for Unique Name and Non-AlphaNumeric Characters

    Hi All,
    How to do Unique name and Non-Alpha Numeric Characters Validation?
    Name should be unique and only allow alphanumeric characters.
    Where all validations must be done? In EOImpl or any other file?
    Plz help
    Thanks,
    Sk

    SK
    Here are the steps you need to perform to check duplicate Employee Names need not entered by user.
    First create a VVO in your schema.server package(that of EO) with the following query.Generate both VVOImpl and VVORowImpl file.
    select full_name
    from fwk_tbx_employees
    where full_name =:1Now add this VVO to your VAM means give instance to it.
    Now open the VVOImpl and write below code to execute query based on new name entered by user
        public void initQuery(String name)
          setWhereClauseParams(null); // Always reset
          setWhereClauseParam(0, name);
          executeQuery();
        }Now open Your Entity Expert class and add below method in it
       public boolean isEmployeeNameExists(String name)
         boolean isExists = false;
               // Note that we want to use a cached, declaratively defined VO instead of creating
               // one from a SQL statement which is far less performant.
         EmployeeNameVVOImpl employeeNameVVO =
           (EmployeeNameVVOImpl)findValidationViewObject("EmployeeNameVVO1");
         employeeNameVVO.initQuery(name);
         // We're just doing a simple existance check.  If we don't find a match, return false.
         if (employeeNameVVO.hasNext())
           isExists = true;
         return isExists;
       }Now you need to call this expert class method from setter method of EOImpl for name.so Open your EOImpl file and go to setter method of name
          if ((value != null) || (!("".equals(value.trim()))))
            EmployeeEntityExpert expert = getEmployeeEntityExpert(getOADBTransaction());
            if (!(expert.isEmployeeNameExists(value)))
                throw new OAException("Duplicate Employee Name", OAException.ERROR);
          }Remember to write code above setAttributeInternal.
    Hope it helps!!!!
    Let me know if you have queries in it.
    Thanks
    AJ

  • ADF: showing error message on a validation rule programatically

    Jdeveloper : 11.1.2.2.0
    i m using ADF. i ve a form that contains input text that is binded to a managed bean property.
    that input text value is inserted into an entity attribute.the attribute in the entity has a validation rule.
    i submit the form and in my managed bean i call
    am.getDBTransaction().commit();
    i want when i submit the form and the when the commit is called and throws exception regarding the validation rule,i want to show an error note window same style like this http://oi50.tinypic.com/15fhnpt.jpg
    how can i do that ?
    thanks in advance :)

    Hi,
    i submit the form and in my managed bean i call
    am.getDBTransaction().commit();A strict NO NO for doing this. You add the commit action to the binding and call the execute the commit operation binding programatically.
    i m using ADF.ADF is vast. Be specific on the technologies you use (ADF BC and ADF Faces?)
    that input text value is inserted into an entity attribute.the attribute in the entity has a validation rule.Are you doing something special with the binding you have in bean? If not, why don't you Drag and Drop the VO from the data control directly? (set the af:messages tag to have inline=true).
    -Arun

  • How to terminate the billing doc if validation fails ????

    Hi Experts ,
    I am doing a development in which i have to check the billing document before saving. For this i am using BADI_SD_BILLING .
    In this i am using INVOICE_DOCUMENT_CHECK to verify the billing document before saving .
    If any validation error occurs while creating billing doc through VF01 , it will show an error message and doc saving will be terminated. This works fine in case of VF01 but while doing collective billing through VF04 , its not working as i have used an error message.
    So to overcome this i have created an application log object  (SLG0) and updated the same . Now the log is getting updated successfully but the billing doc with error is also getting saved.
    So please suggest how to stop saving of billing documents if any validation error occurs.
    Thanks and Regards ,
    Ranjan

    What validation are you performing?  Typically, a 'stop billing' operation is performed in a copy requirement assigned in the billing copy control configuration.  All of the logging is handled from within the requirement and displayed in the billing log, whether it's an individual create or a billing due run.  If the same validation is performed during billing due, this obviously sounds like something that does not require interaction and should be handled via copy control.

Maybe you are looking for

  • Exporting a crystal report to PDF through web server makes fonts smaller

    Hi, I've investigated this issue and found information on the registry keys, and this has fixed crystal designer - so I can load a report, export to PDF and it looks normal. However, when compiling reports through our web-app, the fonts are still sma

  • Monitor Swing events in JSP

    How can I monitor a Swing object's events in a jsp page. Namely, my jsp has an <object> tag which defines a cache_archive param for a jar file. This jar file has a class that creates Swing jbuttons, jpanel and jprogressbar. How can my jsp keep track

  • How to transport deletions of InfoPackages

    Hi, After migrating the datasources to 7.0, I am deleting the infopackages under the datasources. Some of them are prompting for a transport request, but some do not. What is the procedure for transporting those deleted infopacks that did not prompt

  • CJ02 - Error when closing Message - CJ 824

    Hi, I am trying to close the project via CJ02, however when i change the status to IM40(Closed to Actual Cost) i am greeted with following error, The AUC is already settled, Don't know what's happing here, Can anyone  please advise Error when process

  • Under Sun Directory Server, is phpLDAPadmin needed?

    We use Sun Directory Server 6.3. Do we need phpLDAPadmin? What are the advantages and disadvantages to use? Thank you in advance!