Skip to content

Pushing validation side-effects later? #16

@Shadowfiend

Description

@Shadowfiend

Currently validation side-effects are done in Field; that is, S.error is invoked during field handling. It may be worth considering pushing that into the form, so that the field simply returns a Box potentially including its error data, and the form submission handler is charged with invoking S.error. This would make it easier for the invoker to change the behavior (e.g., by not invoking S.error but marking the errors on the client differently, for example). It would also separate concerns a bit better, allowing the field to be solely charged with coordinating the field data, and not with marking the validation error in a client-specific way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions