protected function registerDefaultRules()
    {
        $rulesClasses = array(
            'Alpha',
            'AlphaNumeric',
            'AlphaNumHyphen',
            'ArrayLength',
            'ArrayMaxLength',
            'ArrayMinLength',
            'Between',
            'Callback',
            'Date',
            'DateTime',
            'Email',
            'EmailDomain',
            'Equal',
            'FullName',
            'GreaterThan',
            'InList',
            'Integer',
            'IpAddress',
            'Length',
            'LessThan',
            'Match',
            'MaxLength',
            'MinLength',
            'NotInList',
            'NotRegex',
            'Number',
            'Regex',
            'Required',
            'RequiredWhen',
            'RequiredWith',
            'RequiredWithout',
            'Time',
            'Url',
            'Website',
            'File\Extension',
            'File\Image',
            'File\ImageHeight',
            'File\ImageRatio',
            'File\ImageWidth',
            'File\Size',
            'Upload\Required',
            'Upload\Extension',
            'Upload\Image',
            'Upload\ImageHeight',
            'Upload\ImageRatio',
            'Upload\ImageWidth',
            'Upload\Size',
        );
        foreach ($rulesClasses as $class) {
            $fullClassName       = '\\' . __NAMESPACE__ . '\Rule\\' . $class;
            $name                = strtolower(str_replace('\\', '', $class));
            $errorMessage        = constant($fullClassName . '::MESSAGE');
            $labeledErrorMessage = constant($fullClassName . '::LABELED_MESSAGE');
            $this->register($name, $fullClassName, $errorMessage, $labeledErrorMessage);
        }
    }
protected function registerDefaultRules()
    {
        $rulesClasses = array(
            'Alpha',
            'AlphaNumeric',
            'AlphaNumHyphen',
            'ArrayLength',
            'ArrayMaxLength',
            'ArrayMinLength',
            'Between',
            'Callback',
            'Date',
            'DateTime',
            'Email',
            'EmailDomain',
            'Equal',
            'FullName',
            'GreaterThan',
            'InList',
            'Integer',
            'IpAddress',
            'Length',
            'LessThan',
            'Match',
            'MaxLength',
            'MinLength',
            'NotInList',
            'NotRegex',
            'Number',
            'Regex',
            'Required',
            'RequiredWhen',
            'RequiredWith',
            'RequiredWithout',
            'Time',
            'Url',
            'Website',
            'File\Extension',
            'File\Image',
            'File\ImageHeight',
            'File\ImageRatio',
            'File\ImageWidth',
            'File\Size',
            'Upload\Required',
            'Upload\Extension',
            'Upload\Image',
            'Upload\ImageHeight',
            'Upload\ImageRatio',
            'Upload\ImageWidth',
            'Upload\Size',
        );
        foreach ($rulesClasses as $class) {
            $fullClassName       = '\\' . __NAMESPACE__ . '\Rule\\' . $class;
            $name                = strtolower(str_replace('\\', '', $class));
            $errorMessage        = constant($fullClassName . '::MESSAGE');
            $labeledErrorMessage = constant($fullClassName . '::LABELED_MESSAGE');
            $this->register($name, $fullClassName, $errorMessage, $labeledErrorMessage);
        }
    }
protected function registerDefaultRules ( ) { $ rulesClasses = array ( 'Alpha' , 'AlphaNumeric' , 'AlphaNumHyphen' , 'ArrayLength' , 'ArrayMaxLength' , 'ArrayMinLength' , 'Between' , 'Callback' , 'Date' , 'DateTime' , 'Email' , 'EmailDomain' , 'Equal' , 'FullName' , 'GreaterThan' , 'InList' , 'Integer' , 'IpAddress' , 'Length' , 'LessThan' , 'Match' , 'MaxLength' , 'MinLength' , 'NotInList' , 'NotRegex' , 'Number' , 'Regex' , 'Required' , 'RequiredWhen' , 'RequiredWith' , 'RequiredWithout' , 'Time' , 'Url' , 'Website' , 'File\Extension' , 'File\Image' , 'File\ImageHeight' , 'File\ImageRatio' , 'File\ImageWidth' , 'File\Size' , 'Upload\Required' , 'Upload\Extension' , 'Upload\Image' , 'Upload\ImageHeight' , 'Upload\ImageRatio' , 'Upload\ImageWidth' , 'Upload\Size' , ) ; foreach ( $ rulesClasses as $ class ) { $ fullClassName = '\\' . __NAMESPACE__ . '\Rule\\' . $ class ; $ name = strtolower ( str_replace ( '\\' , '' , $ class ) ) ; $ errorMessage = constant ( $ fullClassName . '::MESSAGE' ) ; $ labeledErrorMessage = constant ( $ fullClassName . '::LABELED_MESSAGE' ) ; $ this -> register ( $ name , $ fullClassName , $ errorMessage , $ labeledErrorMessage ) ; } }
Set up the default rules that come with the library
Set up the default rules that come with the library