London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
You can override the mehod SetDefaultValues and set value for Validator property which should be RequireValidator. Something looks like:
public override void SetDefaultValues(ContentType contentType)
{
base.SetDefaultValues(contentType);
Validators = typeof(RequiredValidator).FullName;
}
Hi Team,
Is there a way to set the Custom form element required validator to true, so that it will not be necessary for the user to set it fom the CMS everytime they add.
I have created a custom form element inheriting from TextBlockElementBlock. During SetDefaultValues i want to set the Required validator to true as default, but not sure how to do that.