|
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 : ", 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 : ", true) , $edt_mail); $form->setContent($table); $this->render = $form; } } ?>
Retourner aux tutoriels du composants Textbox
|
|
|
|
|