HTML Form Validation
-
Hi,
I need to custom validate a form from HTML Forms. WPBruiser blocks all custom validations as its validation filter is firing with PHP_INT_MAX.
goodbye-captcha/engine/modules/html-forms/GdbcHtmlFormsPublicModule.php line 24
add_filter(‘hf_validate_form’, array($this, ‘validateFormsRequest’), PHP_INT_MAX, 1 );
If you need PHP_INT_MAX just change the validateFormsRequest function to return the errorCode if it’s not empty. Sth like this:
public function validateFormsRequest($errorCode) { if( !empty( $errorCode ) ){ return $errorCode; } $this->attemptEntity->SectionId = $this->getOptionIdByOptionName(GdbcHtmlFormsAdminModule::OPTION_IS_HTML_FORMS_ACTIVATED); return GdbcRequestController::isValid($this->attemptEntity) ? null : 'blocked_by_gdbc'; }
Can you please fix this?
Is there a public repo to make a PR?
Is this plugin still alive?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘HTML Form Validation’ is closed to new replies.