Skip to content

[examples/custom-validation] Set fields to invalid incorrect behaviour #3992

Open
@stefankeil

Description

@stefankeil

Describe the bug
The example suggests to set entry fields to valid or invalid by settingsdk.entry.fields[...].getForLocale(...).setInvalid(true). According to the sdk docs, this actually just works on the field location.

To Reproduce
Steps to reproduce the behavior:

  1. use sdk.entry.fields['slug'].getForLocale(sdk.locales.default).setInvalid(true)
    sdk.entry.fields['slug'].getForLocale(sdk.locales.default).setInvalid(true);

Expected behavior
Form Field should get invalid indicator (red bar…)
In the example the slug field should get a red bar

Screenshots
Screenshot 2023-07-05 at 11 47 02

Desktop (please complete the following information):

  • OS: Mac OS 13.4.1
  • Browser chrome 114.0.5735.198

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