Skip Navigation

[Résolu] Number validation not working if conditional display is set on another field

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:

Field validation does not work in Block editor.

Solution:

This is fixed in the latest version of Toolset Types plugin.

Relevant Documentation:

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.

This topic contains 6 réponses, has 2 voix.

Last updated by lindsayH Il y a 1 an et 4 mois.

Assigned support staff: Luo Yang.

Auteur
Publications
#1621545
With Condition - will save non numerical.png
Condition Set.png
Without Condition.png

The number field's slug is total-years. If I set a condition on the following field then I can save a post without any message\error appearing - total-years is a number field and should error if I type in five (for example). The condition on the field quote-identity is: empty($(total-years))
So if Total Years = nothing, don't show the Select field (quote-identity)

The condition itself works as expected, i.e. if something entered in Total Years, then Quote Identity disappears from the screen, but then the validation doesn't work as noted above.
If I remove the condition, the validation works.

#1622515

Luo Yang
Supporter

Languages: Anglais (English ) Chinois simplifié (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Hello,

Are you using Blocks editor to create/edit the post?

I have tried it in my localhost with the setting you mentioned above, after fill value "FIVE" into "Total Years" field, save the post, refresh browser, I see the field "total-years" is empty, can you confirm it?

#1622941

Yes. Blocks Editor.

If a previously saved post and I enter in a word like Five, and refresh, it reverts back to the originally saved number (5).

If it's brand new and I refresh, yes it goes back to being empty.

Hope that helps. Lins

#1623873

Luo Yang
Supporter

Languages: Anglais (English ) Chinois simplifié (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Thanks for the confirmation, I have escalated this issue, will update here if there is any news.

#1657747

Luo Yang
Supporter

Languages: Anglais (English ) Chinois simplifié (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Here is the feedback from our developers, this is fixed in next version of Types plugin 3.1.11, which is under QA status, but I am not sure when will it be released.

#1669167

Luo Yang
Supporter

Languages: Anglais (English ) Chinois simplifié (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Toolset Types plugin 3.3.11, you can download it here:
https://toolset.com/account/downloads/
please test it, check if the problem is fixed, thanks

#1677233

My issue is resolved now. Thank you!