Skip to content

Can't enable just a few forms for validation #56

@CSchulz

Description

@CSchulz

Hello,

I have globally disabled the validation and want to add some specific forms. So I added the required options to the default options of the resolver, but it doesn't work.

Only the configuration is created and not the model. I have located the issue here:

https://github.com/formapro/JsFormValidatorBundle/blob/master/Form/Subscriber/SubscriberToQueue.php#L50

I am note sure about your complete system but changing it to the following works for me:

// Add only parent forms which are not disabled
if ($globalSwitch && $localSwitch || !$globalSwitch && $localSwitch) {

Yes you can remove $globalSwitch.

Perhaps it would be an idea to add an additional field for overriding the global configuration instead. The change from above remove the option to disable the validation globally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions