Overview

Namespaces

  • MvcCore
    • Ext
      • Auth
        • Virtual
      • Debug
        • Tracy
      • Form
        • Core
        • Validators
      • Request
      • Router
        • Lang
      • View
        • Helpers
  • None

Classes

  • Base
  • Configuration
  • Field
  • FieldGroup
  • Helpers
  • Validator
  • View

Exceptions

  • Exception
  • Overview
  • Namespace
  • Class
  • Tree

Class Validator

Direct known subclasses

MvcCore\Ext\Form\Validators\CompanyId, MvcCore\Ext\Form\Validators\Date, MvcCore\Ext\Form\Validators\SafeString, MvcCore\Ext\Form\Validators\Url, MvcCore\Ext\Form\Validators\ValueInOptions, MvcCore\Ext\Form\Validators\ZipCode, MvcCore\Ext\Form\Validators\Email, MvcCore\Ext\Form\Validators\FloatVal, MvcCore\Ext\Form\Validators\Integer, MvcCore\Ext\Form\Validators\Maxlength, MvcCore\Ext\Form\Validators\NumberField, MvcCore\Ext\Form\Validators\Pattern, MvcCore\Ext\Form\Validators\Phone, MvcCore\Ext\Form\Validators\RangeField

Indirect known subclasses

MvcCore\Ext\Form\Validators\CompanyVatId, MvcCore\Ext\Form\Validators\MaxSelectedOptions, MvcCore\Ext\Form\Validators\MinSelectedOptions, MvcCore\Ext\Form\Validators\Time
Abstract
Namespace: MvcCore\Ext\Form\Core
Located at ext-form/src/MvcCore/Ext/Form/Core/Validator.php
Methods summary
public static MvcCore\Ext\Form\Core\Validator[]|mixed
# Create( MvcCore\Ext\Form\Core\Configuration & $form, string $validatorName = '' )

Create new validator instance by validator class name end if necessary, if validator instance for this name exists, previous instance is returned.

Create new validator instance by validator class name end if necessary, if validator instance for this name exists, previous instance is returned.

Parameters

$form
submitting simple form instance
$validatorName
validator class name end

Returns

MvcCore\Ext\Form\Core\Validator[]|mixed

Throws

MvcCore\Ext\Form\Core\Exception
public
# __construct( MvcCore\Ext\Form\Core\Configuration & $form )

Create new validator instance.

Create new validator instance.

Parameters

$form
public string|array
# Validate( string|array $submitValue, string $fieldName, MvcCore\Ext\Form\Core\Field & $field )

Validation template method. In your validator implementation, check submitted value by validator specific rules and if there is any error, call $form->AddError with translated or not translated error message. Return safe submitted value as result.

Validation template method. In your validator implementation, check submitted value by validator specific rules and if there is any error, call $form->AddError with translated or not translated error message. Return safe submitted value as result.

Parameters

$submitValue
$fieldName
$field

Returns

string|array
safe submitted value
protected
# addError( MvcCore\Ext\Form\Core\Field & $field, $msg = '', callable $replaceCall = NULL )
Properties summary
protected MvcCore\Ext\Form|MvcCore\Ext\Form\Core\Base $Form
# NULL
protected MvcCore\Controller|mixed $Controller
# NULL
protected boolean $Translate
# FALSE
protected callable $Translator
# NULL
protected static string $validatorsClassNameTemplate
# '\MvcCore\Ext\Form\Validators\{ValidatorName}'
protected static MvcCore\Ext\Form\Core\Validator[]|mixed $instances
# array()
MvcCore API documentation generated by ApiGen