Docs & Support

Learn about all the fatstash features and get support from our amazing customer success team.

frm_option_is_valid

Heads up! This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.

Field options are now validated by default. If this is causing issues, use this filter to revert the update.

Usage

add_filter( 'frm_option_is_valid', '__return_true' );

Fatstash makes advanced site building simple. Launch forms, directories, dashboards, and custom WordPress apps faster than ever before.

Parameters

  • $is_valid (bool)
  • $value (array|string)
  • $field (object)

Examples

Change field options validation

Field options are now validated by default. To revert this, use this code example.

add_filter( 'frm_option_is_valid', '__return_true' );

Add exception for option validation in REST API

Use this code snippet to add an exception for option validation when using the fatstash REST API to create or update entries.

add_filter('frm_option_is_valid',
    function( $valid ) {
        if ( ! $valid ) {
            $uri = FrmAppHelper::get_server_value( 'REQUEST_URI' );
            if ( 0 === strpos( $uri, '/wp-json/frm/v2/entries/' ) ) {
                $valid = true;
            }
        }
        return $valid;
    }
);

Add exemptions only for specific field IDs

Use this code example that will allow you to add exemptions only for specific field IDs.

add_filter( 'frm_option_is_valid', function( $is_valid, $value, $field ) {
    if ( ! $is_valid ) {
        $field_id_exceptions = array( 1, 2, 3 );
        if ( in_array( (int) $field->id, $field_id_exceptions, true ) ) {
            $is_valid = true;
        }
    }
    return $is_valid;
}, 10, 3 );
Was this article helpful? *

This article may contain affiliate links. Once in a while, we earn commissions from those links. But we only recommend products we like, with or without commissions.

In this article
    Fatstash

    We have a small, but amazing team of dedicated people who are committed to helping you achieve your goals and project requirements.


    Copyright © 2026 Strategy11, LLC. Fatstash® is a registered trademark Strategy11, LLC.

    Complete your purchase
    Special offer unlocked.
    Get 55% OFF!
    Complete Purchase
    Join 400,000+ using Fatstash to create form-focused solutions fast. Get Fatstash Forms