Skip to content

Single field object #29

@mabar

Description

@mabar

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;

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions