ICanBoogie
  • Documentation
  • API Reference
  • Validate v0.1.0
Namespaces
  • ICanBoogie
    • Validate
      • Reader
      • Validation
      • Validator
      • ValidatorProvider
Classes
  • Context
  • Message
  • Render
  • Validation
  • ValidationErrors
Interfaces
  • Reader
  • Validator
  • ValidatorOptions
  • ValidatorProvider
Exceptions
  • ParameterIsMissing
  • ValidationFailed

Interface Validator

An interface for validators.

ICanBoogie\Validate\Validator implements ICanBoogie\Validate\ValidatorOptions

Direct known implementers

ICanBoogie\Validate\Validator\AbstractValidator

Indirect known implementers

ICanBoogie\Validate\Validator\AbstractComparisonValidator, ICanBoogie\Validate\Validator\AbstractRangeValidator, ICanBoogie\Validate\Validator\IsNull, ICanBoogie\Validate\Validator\IsTrue, ICanBoogie\Validate\Validator\JSON, ICanBoogie\Validate\Validator\Max, ICanBoogie\Validate\Validator\MaxLength, ICanBoogie\Validate\Validator\Min, ICanBoogie\Validate\Validator\MinLength, ICanBoogie\Validate\Validator\NotBetween, ICanBoogie\Validate\Validator\NotBetweenLength, ICanBoogie\Validate\Validator\NotBlank, ICanBoogie\Validate\Validator\Between, ICanBoogie\Validate\Validator\NotEqual, ICanBoogie\Validate\Validator\NotIdentical, ICanBoogie\Validate\Validator\NotNull, ICanBoogie\Validate\Validator\Regex, ICanBoogie\Validate\Validator\Required, ICanBoogie\Validate\Validator\TimeZone, ICanBoogie\Validate\Validator\Type, ICanBoogie\Validate\Validator\URL, ICanBoogie\Validate\Validator\BetweenLength, ICanBoogie\Validate\Validator\Blank, ICanBoogie\Validate\Validator\Boolean, ICanBoogie\Validate\Validator\Email, ICanBoogie\Validate\Validator\Equal, ICanBoogie\Validate\Validator\Identical, ICanBoogie\Validate\Validator\IsFalse

Namespace: ICanBoogie\Validate
Located at Validator.php

Methods summary

public normalize_params( array $params ) : array

Normalize parameters and options.

Normalize parameters and options.

Parameters

$params

Returns

array
public validate( mixed $value, ICanBoogie\Validate\Context $context ) : boolean

Validate a value.

Validate a value.

Parameters

$value
$context

Returns

boolean

Constants summary

ALIAS

Validator alias.

Validator alias.

null
DEFAULT_MESSAGE : string

Default error message.

Default error message.

"is not valid"
MESSAGE_ARG_ATTRIBUTE : string

Index name of message attribute argument.

Index name of message attribute argument.

'attribute'
MESSAGE_ARG_VALUE : string

Index name of message value argument.

Index name of message value argument.

'value'
MESSAGE_ARG_VALIDATOR : string

Index name of message validator argument.

Index name of message validator argument.

'validator'

Constants inherited from ICanBoogie\Validate\ValidatorOptions

OPTION_IF, OPTION_MESSAGE, OPTION_STOP_ON_ERROR, OPTION_UNLESS

Validate v0.1.0 – Check on GitHub – API documentation generated by ApiGen