WebSite-PHP Framework PHP
Mehrsprachig
Einfacher Ajax Modus
Kein HTML, kein JavaScript
URL Rewriting
Mails senden
Sitemap - RSS - Web service
Laden Sie WebSite-PHP FrameWork jetzt herunter
 


Loading
 


Tutorial : TextBox with multi live 
validation (numeric, mail, presence)

Tutorials

>

Tutorial Textbox

>

Tutorial : TextBox with multi live validation (numeric, mail, presence)


Textbox-04: Tutorial der Komponente Textbox vom PHP FrameWork WebSite-PHP.

Tutorial : TextBox with multi live validation (numeric, mail, presence):

Number : 
Email : 


Zurück zum Tutorial der Komponente Textbox



Quelltext

Quelltext


Datei: /pages/tutorials/textbox/textbox-04.php

<?php
class Textbox04 extends Page {
    public function 
InitializeComponent() {
        
parent::$PAGE_TITLE "Tutorial : TextBox with multi live 
                            validation (numeric, mail, presence)"
;
        
        
$form = new Form($this); 
        
$table = new Table();
        
        
$edt_numeric = new TextBox($form);
        
$edt_numeric_validation = new LiveValidation();
        
$edt_numeric_validation->addValidatePresence();
        
$edt_numeric_validation->addValidateNumericality();
        
$edt_numeric->setLiveValidation($edt_numeric_validation);
        
        
$table->addRowColumns(new Label("Number :&nbsp;"true)
                                , 
$edt_numeric);
        
        
$edt_mail = new TextBox($form);
        
$edt_mail_validation = new LiveValidation();
        
$edt_mail_validation->addValidatePresence();
        
$edt_mail_validation->addValidateEmail();
        
$edt_mail->setLiveValidation($edt_mail_validation);
        
        
$table->addRowColumns(new Label("Email :&nbsp;"true)
                                , 
$edt_mail);
        
        
$form->setContent($table);
        
$this->render $form;
    }
}
?>


Zurück zum Tutorial der Komponente Textbox


Share

 


Copyright © 2009-2024 WebSite-PHP Framework PHP
Start Dokumentation Herunterladen Schnellstart Tutorials Wiki Issue Tracker