acf_field_number::render_field_validation_settings()publicACF 6.0

Renders the field settings used in the "Validation" tab.

Метод класса: acf_field_number{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$acf_field_number = new acf_field_number();
$acf_field_number->render_field_validation_settings( $field );
$field(массив) (обязательный)
The field settings array.

Список изменений

С версии 6.0 Введена.

Код acf_field_number::render_field_validation_settings() ACF 6.0.4

function render_field_validation_settings( $field ) {
	acf_render_field_setting(
		$field,
		array(
			'label'        => __( 'Minimum Value', 'acf' ),
			'instructions' => '',
			'type'         => 'number',
			'name'         => 'min',
		)
	);

	acf_render_field_setting(
		$field,
		array(
			'label'        => __( 'Maximum Value', 'acf' ),
			'instructions' => '',
			'type'         => 'number',
			'name'         => 'max',
		)
	);
}