# elementor/4.2.0-dev2/modules/interactions/validators/breakpoints-value.php

Elementor Website Builder – more than just a page builder, version 4.2.0-dev2. 70 lines.

- Page: https://pluginprobe.com/plugins/elementor/4.2.0-dev2/code/modules/interactions/validators/breakpoints-value.php
- Raw: https://pluginprobe.com/plugins/elementor/4.2.0-dev2/raw/modules/interactions/validators/breakpoints-value.php
- Modified: 2026-03-30T09:49:26+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/elementor/4.2.0-dev2/code/modules/interactions/validators/breakpoints-value.php#L10-L20`.

```php
<?php

namespace Elementor\Modules\Interactions\Validators;

use Elementor\Modules\Interactions\Validators\String_Value as StringValueValidator;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

class Breakpoints_Value {
	public static function is_valid( $breakpoints_prop_value ) {
		if ( ! is_array( $breakpoints_prop_value ) ) {
			return false;
		}

		if ( ! isset( $breakpoints_prop_value['$$type'] ) || 'interaction-breakpoints' !== $breakpoints_prop_value['$$type'] ) {
			return false;
		}

		if ( ! isset( $breakpoints_prop_value['value'] ) || ! is_array( $breakpoints_prop_value['value'] ) ) {
			return false;
		}

		return self::validate_value( $breakpoints_prop_value['value'] );
	}

	private static function validate_value( $value ) {
		if ( ! is_array( $value ) ) {
			return false;
		}

		if ( ! isset( $value['excluded'] ) || ! is_array( $value['excluded'] ) ) {
			return false;
		}

		return self::validate_excluded( $value['excluded'] );
	}

	private static function validate_excluded( $excluded ) {
		if ( ! is_array( $excluded ) ) {
			return false;
		}

		if ( ! isset( $excluded['$$type'] ) || 'excluded-breakpoints' !== $excluded['$$type'] ) {
			return false;
		}

		if ( ! isset( $excluded['value'] ) || ! is_array( $excluded['value'] ) ) {
			return false;
		}

		return self::validate_excluded_value( $excluded['value'] );
	}

	private static function validate_excluded_value( $value ) {
		if ( ! is_array( $value ) ) {
			return false;
		}

		foreach ( $value as $breakpoint_value ) {
			if ( ! StringValueValidator::is_valid( $breakpoint_value ) ) {
				return false;
			}
		}

		return true;
	}
}

```
