New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input Field Validation Issue #1486

Closed
hellor0bot opened this Issue Jul 29, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@hellor0bot

hellor0bot commented Jul 29, 2017

Issue description:

Getting exactly the same issue as here:

#1413

Version used:

Develop branch.

Using theme_mods or options?

theme_mods

Code to reproduce the issue (config + field(s))

Kirki::add_field( 'theme_mod', array(
	'type'        => 'number',
	'settings'    => 'topbar_content_left_social_accounts_limit',
	'label'       => esc_html__( 'Limit', 'theme-domain' ),
	'description' => esc_html__( 'Number of social accounts.', 'theme-domain' ),
	'section'     => 'topbar',
	'default'     => 3,
	'choices'     => array(
		'min'  => '1',
		'max'  => '10',
		'step' => '1',
	),
	'priority'    => 10,
) );

Could you please check? Thanks!

@hellor0bot hellor0bot changed the title from Input Fields Validation Issue to Input Field Validation Issue Jul 29, 2017

@aristath aristath closed this in 3513cec Jul 29, 2017

@aristath

This comment has been minimized.

Show comment
Hide comment
@aristath

aristath Jul 29, 2017

Owner

fixed, can you please try this now?

Owner

aristath commented Jul 29, 2017

fixed, can you please try this now?

@hellor0bot

This comment has been minimized.

Show comment
Hide comment
@hellor0bot

hellor0bot Jul 29, 2017

Fixed. Awesome, thanks!

By the way, can I remove the 'choices' parameter?

hellor0bot commented Jul 29, 2017

Fixed. Awesome, thanks!

By the way, can I remove the 'choices' parameter?

@aristath

This comment has been minimized.

Show comment
Hide comment
@aristath

aristath Jul 29, 2017

Owner

If you remove the choices param, it will fallback to using these values:

array(
	'min'  => -999999999,
	'max'  => 999999999,
	'step' => 1,
)
Owner

aristath commented Jul 29, 2017

If you remove the choices param, it will fallback to using these values:

array(
	'min'  => -999999999,
	'max'  => 999999999,
	'step' => 1,
)
@hellor0bot

This comment has been minimized.

Show comment
Hide comment
@hellor0bot

hellor0bot Jul 29, 2017

I asked, because I used to omit the parameter and in one of the latest version I got an undefined error.
It's fine now though. Many thanks for fixing the issue so fast!

hellor0bot commented Jul 29, 2017

I asked, because I used to omit the parameter and in one of the latest version I got an undefined error.
It's fine now though. Many thanks for fixing the issue so fast!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment