Skip to content

[Form Validation] Errors on fields that don't have rules defined #3443

@otavioserra

Description

@otavioserra

Bug Report

I defined Form Validation rules programmatically in some fields, not in all fields. Some fields are only optional, and they always they trhown errors like this for all fields unmapped:

 Form: Field identifier undefined not found | overrideMethod | @ | installHook.js:1   | error | @ | semantic.min.js:11   | field | @ | semantic.min.js:11   | field | @ | semantic.min.js:11   | (anonymous) | @ | semantic.min.js:11   | each | @ | jquery.min.js:2   | each | @ | jquery.min.js:2   | isValid | @ | semantic.min.js:11   | form | @ | semantic.min.js:11   | dispatch | @ | jquery.min.js:2   | v.handle | @ | jquery.min.js:2

The console starts to show a bunch of errors like this. These errors are soft errors because they don't impact the behavior of the collection Form, but for enoing clients, they can argue it is broken. So, if possible, please give me one option to solve this in one setting. I found that we can put data-validate="skip" in all fields, but for me, who has a lot of fields in the platform, it can be difficult.

Steps to reproduce

Defining programmatically Form Validation rules in some fields, not in all fields.

Expected result

Ignore fields aren't ruled mapped

Actual result

Throw errors for fields not ruled mapped

Testcase

N / A

Screenshot (if possible)

Image

Version

2.9.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixed in next-release/nightlyAny issue which has a corresponding PR which has been merged and is available in the nightly buildtype/bugAny issue which is a bug or PR which fixes a bug

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions