Version::getPart

public static getPart (mixed $part) Returns a specific part of the version. If the wrong parameter is passed it will return the full version echo Phalcon\Version::getPart(Phalcon\Version::VERSION_MAJOR);

Version::getId

public static getId () Returns the numeric active version echo Phalcon\Version::getId();

Version::get

public static get () Returns the active version (string) echo Phalcon\Version::get();

Version

Source on GitHub This class allows to get the installed version of the framework Constants integer VERSION_MAJOR integer VERSION_MEDIUM integer VERSION_MINOR integer VERSION_SPECIAL integer VERSION_SPECIAL_NUMBER Methods protected static _getVersion () Area where the version number is set. The format is as follows: ABBCCDE A - Major version B - Med version (two digits) C - Min version (two digits) D - Special release: 1 = Alpha, 2 = Beta, 3 = RC, 4 = Stable E - Special release version

Validation\Validator\Url::validate

public validate (Phalcon\Validation $validation, mixed $field) Executes the validation

Validation\Validator\Url

extends abstract class Phalcon\Validation\Validator implements Phalcon\Validation\ValidatorInterface Source on GitHub Checks if a value has a url format use Phalcon\Validation\Validator\Url as UrlValidator; $validator->add('url', new UrlValidator([ 'message' => ':field must be a url' ])); $validator->add(['url', 'homepage'], new UrlValidator([ 'message' => [ 'url' => 'url must be a url', 'homepage' => 'homepage must be a url' ] ])); Meth

Validation\Validator\Uniqueness::validate

public validate (Phalcon\Validation $validation, mixed $field) Executes the validation

Validation\Validator\Uniqueness

extends abstract class Phalcon\Validation\CombinedFieldsValidator implements Phalcon\Validation\ValidatorInterface Source on GitHub Check that a field is unique in the related table use Phalcon\Validation\Validator\Uniqueness as UniquenessValidator; $validator->add('username', new UniquenessValidator([ 'model' => new Users(), 'message' => ':field must be unique' ])); Different attribute from the field: $validator->add('username', new UniquenessValidator([

Validation\Validator\StringLength::validate

public validate (Phalcon\Validation $validation, mixed $field) Executes the validation

Validation\Validator\StringLength

extends abstract class Phalcon\Validation\Validator implements Phalcon\Validation\ValidatorInterface Source on GitHub Validates that a string has the specified maximum and minimum constraints The test is passed if for a string’s length L, min<=L<=max, i.e. L must be at least min, and at most max. use Phalcon\Validation\Validator\StringLength as StringLength; $validation->add('name_last', new StringLength([ 'max' => 50, 'min' => 2, 'messageMaximum' => 'We don\'