We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Make field required in add/edit dialog fields

How to make fields required to fill for users in add/edit dialog template of Ga


3 Replies 1 reply marked as answer

GM Gopinath Munusamy Syncfusion Team January 23, 2023 07:23 AM UTC

Hi Nurbek,

As of now, we do not have complete support for this. We already have logged a feature request for the requirement. we do not have any immediate plan to implement this feature. At the planning stage for every release cycle, we review all open features and implement the features based on feature rank, customer requested count, and volume wish-list. You can track the status of the feature from below feedback link.


Feedback: https://www.syncfusion.com/feedback/15480/provide-support-for-custom-validation-in-add-edit-dialog


However, You can prevent the save action when any of the fields are empty by using the actionBegin event and checking if the args.requestType is equal to "beforeSave". In this example, we are restricting the save action for tasks that have an empty string in the taskName field. We have attached a sample and code snippets for your reference, please check the below sample and code snippets for more details.

Code snippets:

actionBegin(args) {

    if (args.requestType == 'beforeSave' && args.data.TaskName == '') {

      args.cancel = true;

    }

  },

Sample: https://stackblitz.com/edit/v2azxa?file=index.ts,data-source.ts

UG Documentation: https://ej2.syncfusion.com/documentation/api/gantt#actionbegin

Regards,

Gopinath M



NU Nurbek January 23, 2023 09:18 AM UTC

Nice,but I would like to have something like validation rule : here is a reference of that functionality in your form component.


https://ej2.syncfusion.com/vue/documentation/form-validator/validation-rules/



GM Gopinath Munusamy Syncfusion Team January 30, 2023 01:23 PM UTC

Nurbek, as we have already lined up some major features, we do not have any immediate plan to implement this feature. At the planning stage for every release cycle, we review all open features and implement the features based on feature rank, customer requested count, and volume wish-list. Please cast your vote on this feature. Based on the customer demand we will prioritize the features in our upcoming road maps.


You can track the status of the feature from the feedback link given below.

Feedback: https://www.syncfusion.com/feedback/15480/provide-support-for-custom-validation-in-add-edit-dialog


Marked as answer
Loader.
Up arrow icon