From 223bcfc780e99f08b1a5ce6ed670bf0d69cc887d Mon Sep 17 00:00:00 2001 From: Vipin Shrivastava Date: Fri, 24 Dec 2021 13:22:42 +0530 Subject: [PATCH] updates --- Resources/views/savedReplyForm.html.twig | 4 ++++ Resources/views/ticket.html.twig | 2 +- Resources/views/ticketTypeAdd.html.twig | 17 +++++++++++++++-- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Resources/views/savedReplyForm.html.twig b/Resources/views/savedReplyForm.html.twig index 3b944af22..433aceb78 100644 --- a/Resources/views/savedReplyForm.html.twig +++ b/Resources/views/savedReplyForm.html.twig @@ -177,6 +177,10 @@ ,{ pattern: '^(?!.*[!@#$%^&*()<_+])', msg: "{{ 'Name must have characters only' }}" + }, + { + maxLength:100, + msg: "{{ 'This field contain maximum 100 characters.'|trans }}" } ], } diff --git a/Resources/views/ticket.html.twig b/Resources/views/ticket.html.twig index ef5f7b810..607d89a56 100755 --- a/Resources/views/ticket.html.twig +++ b/Resources/views/ticket.html.twig @@ -566,7 +566,7 @@ diff --git a/Resources/views/ticketTypeAdd.html.twig b/Resources/views/ticketTypeAdd.html.twig index 8b86ab23e..041ac5575 100644 --- a/Resources/views/ticketTypeAdd.html.twig +++ b/Resources/views/ticketTypeAdd.html.twig @@ -78,14 +78,27 @@ $(function () { var TypeModel = Backbone.Model.extend({ validation: { - 'code': { + 'code': [{ required: true, msg: "{{ 'This field is mandatory'|trans }}" + } + ,{ + pattern: '^(?!.*[!@#$%^&*()<_+])', + msg: "{{ 'Name must have characters only' }}" }, - 'description': { + ,{ + maxLength:200, + msg: "{{ 'This field contain maximum 100 characters.'|trans }}" + }], + 'description': [{ required: true, msg: "{{ 'This field is mandatory'|trans }}" } + ,{ + maxLength:200, + msg: "{{ 'This field contain maximum 200 characters.'|trans }}" + } + ], } });