For value objects support - like email, url, phone number, credit card number.
Value objects may be whole different library, with object mapper being an optional feature.
instead of items key accepts only values of items (expects the value of field to be given directly, not in array of ['field' => 'value']
allows single mapped property
callbacks should still work the same
types should be modified for the different structure
but still allow field-independent errors?
FieldName modifier is forbidden
#[SingleFieldObject]
final class SingleFieldInput implements MappedObject
{
#[ListOf(item: new MappedObjectValue(ItemInput::class))]
public array $items;
}
For value objects support - like email, url, phone number, credit card number. Value objects may be whole different library, with object mapper being an optional feature.
items
key accepts only values ofitems
(expects the value of field to be given directly, not in array of['field' => 'value']