We have a requirement like,
I have a news category dropdown on Episerver page type which is holding different options.
When cms editor selects one particular news category from options(User Alerts), the other field (Alert Text) which is the text editor, should make it a mandatory field before publishing.
And this (Alert Text) text editor field is not mandatory for other new category types.
How to achieve this requirement.
Appreciate your help. Many thanks in advance.
Sounds like you might benefit from hooking into Content Events. Here's a few helpful links:
Could this article also help : Refresh current editing context on property value change (optimizely.com)
It details how you can change the state of one property based on another.
If you do not require the UI to change, and visually indicate that the other fields become mandatory, the easiest approach is to create a custom validator using the IValidate<T> interface.