Index
A
- Context::addError() — Method in class Context
- Context::addWarning() — Method in class Context
- AnyOf — Class in namespace Nette\Schema\Elements
Schema that accepts any of a fixed set of values or sub-schemas (union type / enumeration).
- Base::assert() — Method in class Base
Adds a custom validation assertion; optionally describe it for error messages.
- Expect::anyOf() — Method in class Expect
Creates a union schema that accepts any of the given values or sub-schemas.
- Expect::array() — Method in class Expect
Creates an array schema. When passed Schema elements, behaves like structure() but outputs an array.
- Expect::arrayOf() — Method in class Expect
Creates an associative or indexed array schema where every value matches the given type.
B
- Base — Class in namespace Nette\Schema\Elements
- Base::before() — Method in class Base
Sets a pre-normalization callback applied to the raw input value before any validation.
- Expect::bool() — Method in class Expect
C
- Context — Class in namespace Nette\Schema
Accumulates errors and warnings during schema validation and tracks the current path.
- Context::createChecker() — Method in class Context
- AnyOf::complete() — Method in class AnyOf
Validates the value and applies defaults, transforms, and assertions.
- AnyOf::completeDefault() — Method in class AnyOf
Returns the default value, or adds a missing-item error if the field is required.
- Base::castTo() — Method in class Base
Casts the validated value to a built-in type or instantiates the given class.
- Base::completeDefault() — Method in class Base
- Structure::complete() — Method in class Structure
Validates the value and applies defaults, transforms, and assertions.
- Structure::completeDefault() — Method in class Structure
Returns the default value, or adds a missing-item error if the field is required.
- Type::complete() — Method in class Type
Validates the value and applies defaults, transforms, and assertions.
- Schema::complete() — Method in class Schema
Validates the value and applies defaults, transforms, and assertions.
- Schema::completeDefault() — Method in class Schema
Returns the default value, or adds a missing-item error if the field is required.
D
- $ Context#dynamics — Property in class Context
- DynamicParameter — Class in namespace Nette\Schema
- AnyOf::dynamic() — Method in class AnyOf
Allows the value to be a DynamicParameter as an accepted variant.
- Base::default() — Method in class Base
- Base::deprecated() — Method in class Base
Marks the item as deprecated; emits a warning with the given message when the item is used.
- Base::doNormalize() — Method in class Base
- Structure::default() — Method in class Structure
Not supported for structures; always throws.
- Type::dynamic() — Method in class Type
Allows the value to be a DynamicParameter, which is recorded for deferred validation.
E
- $ Context#errors — Property in class Context
- Structure::extend() — Method in class Structure
Creates a new structure by merging this shape with additional properties.
- Expect — Class in namespace Nette\Schema
Schema generator.
- Expect::email() — Method in class Expect
F
- AnyOf::firstIsDefault() — Method in class AnyOf
Sets the first variant as the default value (instead of null).
- Expect::from() — Method in class Expect
Generates a structure schema from a class by reflecting its properties or constructor parameters.
- Expect::float() — Method in class Expect
- Helpers::formatValue() — Method in class Helpers
Formats a value for use in error messages (e.g., 'hello', true, object stdClass).
G
- Structure::getShape() — Method in class Structure
- Helpers::getCastStrategy() — Method in class Helpers
Returns a closure that casts a value to the given type (built-in, class with constructor, or plain class).
- Processor::getWarnings() — Method in class Processor
Returns all deprecation warnings collected during the last processing run.
- ValidationException::getMessages() — Method in class ValidationException
Returns all validation error messages as formatted strings.
- ValidationException::getMessageObjects() — Method in class ValidationException
Returns all validation error messages as Message objects.
H
- Helpers — Class in namespace Nette\Schema
I
- $ Context#isKey — Property in class Context
- Type::items() — Method in class Type
- Expect::int() — Method in class Expect
- Helpers::isInRange() — Method in class Helpers
Checks whether a value falls within the given [min, max] range (null means no bound).
L
- Expect::listOf() — Method in class Expect
Creates a list schema (sequentially indexed from 0) where every element matches the given type.
- Expect::list() — Method in class Expect
M
- AnyOf::merge() — Method in class AnyOf
Merges two normalized values, with $value taking priority over $base.
- Structure::min() — Method in class Structure
- Structure::max() — Method in class Structure
- Structure::merge() — Method in class Structure
Merges two normalized values, with $value taking priority over $base.
- Type::mergeDefaults() — Method in class Type
- Type::mergeMode() — Method in class Type
Sets how arrays are combined when merging multiple configurations.
- Type::min() — Method in class Type
- Type::max() — Method in class Type
- Type::merge() — Method in class Type
Merges two normalized values, with $value taking priority over $base.
- Expect::mixed() — Method in class Expect
- Helpers::merge() — Method in class Helpers
Merges dataset. Left has higher priority than right one.
- Message — Class in namespace Nette\Schema
Represents a single validation error or warning with a message template, error code, path, and variables.
- Schema::merge() — Method in class Schema
Merges two normalized values, with $value taking priority over $base.
N
- AnyOf::nullable() — Method in class AnyOf
Allows null as an accepted value in addition to the defined variants.
- AnyOf::normalize() — Method in class AnyOf
Applies pre-processing transformations to the raw input value (e.g., via before() hooks).
- Structure::normalize() — Method in class Structure
Applies pre-processing transformations to the raw input value (e.g., via before() hooks).
- Type::nullable() — Method in class Type
Allows the value to be null in addition to the declared type.
- Type::normalize() — Method in class Type
Applies pre-processing transformations to the raw input value (e.g., via before() hooks).
- Expect::null() — Method in class Expect
- Schema::normalize() — Method in class Schema
Applies pre-processing transformations to the raw input value (e.g., via before() hooks).
O
- Structure::otherItems() — Method in class Structure
Allows extra keys not defined in the shape, validating their values against the given type.
- $ Processor#onNewContext — Property in class Processor
P
- $ Context#path — Property in class Context
- Type::pattern() — Method in class Type
Sets a regex pattern the string value must match entirely (anchored to start and end).
- Processor — Class in namespace Nette\Schema
Schema validator.
- Processor::process() — Method in class Processor
Normalizes and validates data. Result is a clean completed data.
- Processor::processMultiple() — Method in class Processor
Normalizes and validates and merges multiple data. Result is a clean completed data.
R
- Base::required() — Method in class Base
S
- $ Context#skipDefaults — Property in class Context
- Structure — Class in namespace Nette\Schema\Elements
- Structure::skipDefaults() — Method in class Structure
When enabled, properties whose value equals the default are omitted from the output.
- Expect::structure() — Method in class Expect
Creates a structure schema with defined properties; output is stdClass.
- Expect::scalar() — Method in class Expect
- Expect::string() — Method in class Expect
- Processor::skipDefaults() — Method in class Processor
When enabled, properties with default values are omitted from the output.
- Schema — Class in namespace Nette\Schema
Defines the contract for schema elements used in data validation and normalization.
T
- Base::transform() — Method in class Base
Adds a post-validation transformation callback. The handler may also report errors via Context.
- Type — Class in namespace Nette\Schema\Elements
- Expect::type() — Method in class Expect
Creates a schema for a custom type expression (e.g., 'int|string', 'null|float').
- Message::toString() — Method in class Message
Formats the message template by substituting %variable% placeholders with their values.
U
- Expect::unicode() — Method in class Expect
V
- Helpers::validateType() — Method in class Helpers
Adds a TypeMismatch error to the context if the value does not match the expected type.
- Helpers::validateRange() — Method in class Helpers
Adds a range error to the context if the value (or its length for strings/arrays) is outside the given range.
- Helpers::validatePattern() — Method in class Helpers
Adds a PatternMismatch error to the context if the value does not match the pattern.
- ValidationException — Class in namespace Nette\Schema
Validation error.
W
- $ Context#warnings — Property in class Context
_
- AnyOf::__construct() — Method in class AnyOf
- Structure::__construct() — Method in class Structure
- Type::__construct() — Method in class Type
- Expect::__callStatic() — Method in class Expect
- Message::__construct() — Method in class Message
- ValidationException::__construct() — Method in class ValidationException