1

I've assigned a Parameter Template in the MVC form rendering called Redirect Parameters (/sitecore/layout/Renderings/System/Forms/Mvc Form) as shown in below screnshot

enter image description here

Within this template, I've created a Multilist with Search field as shown in below screenshot.

enter image description here

And in the RedirectDataSource field item, I've added the following Validation: enter image description here

It must allow the selection of just one value.

However, it's not working. There's no message, nor an error message. It looks like I didn't set up any validation. Also, I've assigned this same Validation for a regular Template, and it works fine. So I have no idea why it's not working.

Is there anyone who faced this same issue?

1 Answer 1

1

I think you need to use a different approach to do this. I have verified this by creating the same scenario according to your question.

  1. You need to go under Validation Rules using the path /sitecore/system/Settings/Validation Rules and need to create a new Validation Rule. The type should be RegexValidator Refer to the screenshot below.

enter image description here

  1. Then you need to go to your rendering parameter field and apply that rule under the Validation Rules section like this.

enter image description here

And when you select more than one value in the field in your rendering parameter, then you can see the validation in the red bar on the left and red dots on the right top.

enter image description here

And if you want to see the alert message, then I think you need to do some customizations.

Hope this help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.