Skip to content
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
Closed

Input Field Validation Issue #1486

hellor0bot opened this issue Jul 29, 2017 · 4 comments

Comments

@hellor0bot
Copy link

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 Input Fields Validation Issue Input Field Validation Issue Jul 29, 2017
@aristath
Copy link
Contributor

fixed, can you please try this now?

@hellor0bot
Copy link
Author

Fixed. Awesome, thanks!

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

@aristath
Copy link
Contributor

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

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

@hellor0bot
Copy link
Author

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants