Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to apply a conditional rule on a multilingual field for a single language#439

Discussion options

Hello vueform team,
I'm currently building a multilingual form, and I'm trying to add a conditional validation rule for a single language based on the value of another field, this is the schema I have tried:

{"field": {"type":"t-text","rules": {"en": [{"required": [["someOtherField","empty"]] },"max:100"],"fr": ["max:100"]    }  },"someOtherField": {"type":"text"  }}

I have also tried these variations:

"en": [[{"required": [["someOtherField","empty"]] }]]"en": [{"required": [["someOtherField","==","" ]] }]

But I keep running into this error once I modify the second field:

Uncaught (in promise) TypeError: this.element$.Validators.forEach is not a function

@adamberecz could you please advise if I am using a correct syntax as I couldn't find a similar example in the docs?

You must be logged in to vote

Apparently there is a bug with multilingual rules. Opened anissue for it.

Replies: 1 comment

Comment options

Apparently there is a bug with multilingual rules. Opened anissue for it.

You must be logged in to vote
0 replies
Answer selected byalahanoun
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Questions
Labels
None yet
2 participants
@alahanoun@adamberecz

[8]ページ先頭

©2009-2025 Movatter.jp