Skip to content

immediate validation for conditional questions and validateOnRender option issue  #707

Closed
@warmy1004

Description

@warmy1004

Enhancement

I tried to use a different version of schema-form and bootstrap-decorator, and I found validation for conditional questions is immediately happening when forms load with the newest version of bootstrap-decorator. Also, I've tried to use 'validateOnRender' as a global option and a local option, but it didn't work for conditional questions.

FYI, here is version information used in my example;
angularjs & angular-sanitize : v.1.4.8
bootstrap-decorator : v.0.2.0 (I downloaded this version from https://github.com/json-schema-form/angular-schema-form-bootstrap/releases)
ObjectPath : v.1.2.1
schema-form: v.0.8.13

Expected behaviour

I expected validation for conditional questions should not be happening when forms are loaded.

Actual behaviour

It actually immediate validation is happending when forms are loaded. So, every conditional questions has 'has-error' css when they are loaded. Also, I added validateOnRender:false as a global option and a local option to prevent immediate validation manually, but it seems that it didn't work at all because of immediate validation.

However, if a different version of bootstrap-decorator, v.0.8.13 (which is provided with schema-form v.0.8.13 from https://github.com/json-schema-form/angular-schema-form/releases ) is used for the same example, this immediate validation is not happening anymore. In this case, destroyStrategy option is not working at all.

Gist/Plunker/Demo

https://plnkr.co/edit/ONljGAZ2wOB3ySRa8KBY?p=preview

Related issues

This is/maybe related to #682

@json-schema-form/angular-schema-form-lead

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions