Skip to content

if error exists, returns given string.  #2

@asaokamei

Description

@asaokamei

Nice to have a way to simplify the following code,

    $forms->formGroup(
        $forms->text('jumper', $view->data->raw('jumped'))->id(),
    )->class($view->errors->exists('jumped') ? 'has-error' : null);

to such as

    $forms->formGroup(
        $forms->text('jumper', $view->data->raw('jumped'))->id(),
    )->class($view->errors->ifSet('jumped', 'has-error'));

Metadata

Metadata

Assignees

No one assigned

    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