<?php $cf = new Form(array( 'prefix' => 'cf', 'mail' => true, 'nonce' => 'gYxfXm30Q7hruJKB', )); /* Validation Rules -----------------------------------------------*/ $cf->add('name', true)->minlen(3)->maxlen(12); $cf->add('email', true)->type('email'); $cf->add('birthdate')->filter('datetime', 'Y/m/d'); $cf->add('gender')->set_option(array( 'Male', 'Female', )); $cf->add('color+')->set_option(arr