SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Zealot asmictech's Avatar
    Join Date
    Oct 2004
    Location
    nigeria
    Posts
    151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    HTML_Quickform rule fails!!!!

    I am using alphanumeric rule in HTML_Quickform but users could still send numeric values only.
    Here is the code:
    PHP Code:
    $txttotalmail_id $form1->createElement('text''txttotalmailid''', array( 'size' => 25'maxlength' => 30));

    $txttotalmail_id_domain $form1->createElement('text''txttotalmaildomainid''', array( 'size' => 25'maxlength' => 15'value'=> 'totalmail.co.za''onFocus' => 'this.blur()'));
    $form1->addGroup(array($txttotalmail_id$txttotalmail_id_domain), 'txttotalmail_id_value''Totalmail ID:''@');
    $txttotalmail_id_domain->setvalue('totalmail.co.za');
    $txttotalmail_id_domain->freeze();

    $txttotalmailid_rule_1 = array('ID is not valid''required');
    $txttotalmailid_rule_2 = array('ID is not valid''nopunctuation');
    $txttotalmailid_rule_3 = array('ID is not valid''minlength'3);
    $txttotalmailid_rule_4 = array('ID is not valid''alphanumeric');


    //merge the rules or re-encapsulate in array
    $txttotalmail_rules = array($txttotalmailid_rule_1$txttotalmailid_rule_2$txttotalmailid_rule_3$txttotalmailid_rule_4);
    //apply the rules
    $form1->addGroupRule('txttotalmail_id_value', array($txttotalmail_rules,)); 
    It shows the error message when no data is typed but accepts any kind of data eventually.


    Likewise, I discovered that some functions don't work again or deprecated in HTML_Quickform. This "$txttotalmail_id_domain->freeze();" doesn't work also though i worked on older version of Apache or PHP engine(one of my Local Machines).

    What could be wrong?????
    Success is achieved and maintained by those who keep trying.

    www.ngportal.net

  2. #2
    SitePoint Zealot asmictech's Avatar
    Join Date
    Oct 2004
    Location
    nigeria
    Posts
    151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is there anyone with an idea of what could be wrong????
    Success is achieved and maintained by those who keep trying.

    www.ngportal.net

  3. #3
    SitePoint Zealot asmictech's Avatar
    Join Date
    Oct 2004
    Location
    nigeria
    Posts
    151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is there anyone using HTML_Quickform in production site?
    It doesn't seem to work 100%!!!
    Success is achieved and maintained by those who keep trying.

    www.ngportal.net


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •