WebSite-PHP Framework PHP
Multi langues
Mode Ajax simple
Aucun HTML, aucun JavaScript
URL rewrinting
Envoi d'email
Sitemap - RSS - Web service
Télécharger le Framework WebSite-PHP maintenant
 


Loading
 


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

Tutoriels

>

Tutoriel Textbox

>

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


Textbox-04: Tutoriel du composants Textbox du FrameWork PHP WebSite-PHP.

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

Number : 
Email : 


Retourner aux tutoriels du composants Textbox



Code source

Code source


Fichier: /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;
    }
}
?>


Retourner aux tutoriels du composants Textbox


Share

 


Copyright © 2009-2016 WebSite-PHP Framework PHP
Accueil Documentation Télécharger Quick start Tutoriels Wiki Issue Tracker