We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
It would like to be able to cast a value using a callable.
class Foo { public static function fromString($bar) { // some logic } } $schema = Expect::structure([ 'foo' => Expect::string()->castTo(fn ($v) => Foo::fromString($v)); 'foo2' => Expect::string()->castTo('Foo::fromString'); });
I'm willing to make a PR for this if you accept the feature to be integrated in the project.
It would like to be able to cast a value using a callable.
I'm willing to make a PR for this if you accept the feature to be integrated in the project.