Skip to content
This repository was archived by the owner on Apr 20, 2024. It is now read-only.
This repository was archived by the owner on Apr 20, 2024. It is now read-only.

Consider improving naming for validation modes #17

Description

@siemensikkema

I'm not really a fan of the current validation modes names:

form.makeFieldset(inValidationMode: .all)
form.makeFieldset(inValidationMode: .none)
form.makeFieldset(inValidationMode: .nonNil)

(The same holds for the validate method.)

One alternative could be to remove the argument label:

form.makeFieldset(.all)
form.makeFieldset(.none)
form.makeFieldset(.nonNil)

or be a bit more explicit:

form.makeFieldset(validating: .allFields)
form.makeFieldset(validating: .noFields)
form.makeFieldset(validating: .onlyNonNilFields)

or change the names in such a way that they describe the typical use cases:

form.makeFieldset(.forNewEntity)
form.makeFieldset(.noEmptyEntity)
form.makeFieldset(.forUpdatedEntity)

@steffendsommer @BrettRToomey @martinlasek what do you think?

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