Adding a validation check on a survey question whether the question value is empty before submitting a survey in service portal

arundhatimaitra
Kilo Contributor

Hi,

We have a requirement where we have a survey in the service portal which contains a comment field or question. We want to add a validation on the Comments Question in the survey form before submitting the survey.The validation will check whether the Comments Question in the survey form is empty when the user submits the survey,if the comments question is empty then the user should get an alert that whether they want to submit the survey without filling the comments.If the Comments Question is already filled by the user then while submitting the survey he should not receive the alert.We want this scenario in our Service Portal Survey and itil view survey as well.Please advise.

3 REPLIES 3

Swathi12
Tera Expert

Hello,

 

Please refer the below url :

 

https://scotch.io/tutorials/angularjs-form-validation

 

Mark this reply helpful if it answers your question

 

Regards,

Swathi 

Vadzim Surin1
Tera Expert

Hello @arundhatimaitra 
If comment validation is still relevant for you, please look in my attached screens.
To enable validation for any survey questions, you must configure a validator. In the configuration of each question for which you want to add a validator.

VadzimSurin1_0-1731655764382.png

In my example there is a very simple validator. User have to provide a comment with a minimum 10 characters length.

VadzimSurin1_1-1731656022165.png

 




Heyy i am doing same but not able to create a new validation.