Skip Navigation

[Resolved] Custom field – enforced character count

This support ticket is created 7 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 2 voices.

Last updated by Bochnacki 7 years, 2 months ago.

Assisted by: Luo Yang.

Author
Posts
#561746

I have a Custom Field type "number". It is saved as required, but I want to add yet another condition that is to be entered 4 digits.
How can I do this?
I did not find any information on this in the Toolset tutorials, and the forum search engine has been inactive for two days.

#561815

Dear Bochnacki,

I assume we are talking about this feature:
custom numeric field which can input only 4 digits within Types plugin

If it is, there isn't such a built-in feature, if you agree, we can take it as a feature request.

For the search engine problem, we are upgrading our forum system, you can try with Google directly, for example:
hidden link

#561825

"custom numeric field which can input only 4 digits within Types plugin" - not ONLY.
I want 4 digits to be entered. I want if no 4 digits are entered the field did not pass validation. 4 digits must be entered in the field.

Thanks for the hint on searching the forum.

#561841

In custom numeric field of Type plugin, there are two validation options:
1) Required
2) Number
There isn't such a built-in feature as you mentioned above:
4 digits must be entered in the field.

If you agree, we can take it as a feature request, currently, you will try other custom JS codes, for example:
hidden link

For your reference.

#561877

I meant not to use "external" solutions. But if you can not do otherwise, then I will.

Thanks for the help.