MailPoet\EmailEditor\Validator

Schema::field()publicWC 1.0

Set the field name and value.

Method of the class: Schema{}

No Hooks.

Return

static.

Usage

$Schema = new Schema();
$Schema->field( $name, $value );
$name(string) (required)
Name of the field.
$value(mixed) (required)
Value of the field.

Schema::field() code WC 9.8.2

public function field( string $name, $value ) {
	if ( in_array( $name, $this->get_reserved_keywords(), true ) ) {
		throw new \Exception( \esc_html( "Field name '$name' is reserved" ) );
	}
	return $this->update_schema_property( $name, $value );
}