/var/www/(Del)gepgroup.hk/php-activerecord/test/models/RmBldg.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
class RmBldg extends ActiveRecord\Model
{
    static 
$table 'rm-bldg';

    static 
$validates_presence_of = array(
        array(
'space_out''message' => 'is missing!@#'),
        array(
'rm_name')
    );

    static 
$validates_length_of = array(
        array(
'space_out''within' => array(15)),
        array(
'space_out''minimum' => 9'too_short' => 'var is too short!! it should be at least %d long')
    );

    static 
$validates_inclusion_of = array(
        array(
'space_out''in' => array('jpg''gif''png'), 'message' => 'extension %s is not included in the list'),
    );

    static 
$validates_exclusion_of = array(
        array(
'space_out''in' => array('jpeg'))
    );

    static 
$validates_format_of = array(
        array(
'space_out''with' => '/\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i' )
    );

    static 
$validates_numericality_of = array(
        array(
'space_out''less_than' => 9'greater_than' => '5'),
        array(
'rm_id''less_than' => 10'odd' => null)
    );
}
?>