Skip to content

It's not possible to query the validation status of powermail forms via JS #975

@pixeldesu

Description

@pixeldesu

Reported by and confirmed with @maddy2101 in Slack communications. An intent to possibly sponsor this issue being fixed for 10.7.x has been expressed.

It's currently not possible to execute actions on clientside validated forms only if they are actually valid, because Powermails FormValidation JS class does not expose whether the form has errors or not.

Most of the JS API is private, and the currently available methods do not allow to manually trigger validation (FormValidation.validate() falsely only sets up validation, it doesn't actually run it).

To make this possible, some class members of FormValidation should have their visibility increased:

  • validateForm() to manually trigger form validation
  • hasFormErrors() to query form validation status

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions