Title: HTML Form Validation
Last modified: July 12, 2021

---

# HTML Form Validation

 *  [Carlos Faria](https://wordpress.org/support/users/frendeliko/)
 * (@frendeliko)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/html-form-validation-2/)
 * 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?
    -  This topic was modified 4 years, 11 months ago by [Carlos Faria](https://wordpress.org/support/users/frendeliko/).

Viewing 1 replies (of 1 total)

 *  Thread Starter [Carlos Faria](https://wordpress.org/support/users/frendeliko/)
 * (@frendeliko)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/html-form-validation-2/#post-14650460)
 * Nevermind, using PHP_INT_MAX on my hook works great too.
 * Thank you!!

Viewing 1 replies (of 1 total)

The topic ‘HTML Form Validation’ is closed to new replies.

 * ![](https://ps.w.org/goodbye-captcha/assets/icon-256x256.png?rev=1356325)
 * [WPBruiser {no- Captcha anti-Spam}](https://wordpress.org/plugins/goodbye-captcha/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/goodbye-captcha/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/goodbye-captcha/)
 * [Active Topics](https://wordpress.org/support/plugin/goodbye-captcha/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/goodbye-captcha/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/goodbye-captcha/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [Carlos Faria](https://wordpress.org/support/users/frendeliko/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/html-form-validation-2/#post-14650460)
 * Status: not resolved