server validation for removing html tag from text field component | Community
Skip to main content
New Participant
October 20, 2015
Solved

server validation for removing html tag from text field component

  • October 20, 2015
  • 3 replies
  • 772 views

I am using http://localhost:4503/libs/foundation/components/form/text/text.jsp which has sling:resourceSuperType    pointing to     foundation/components/form/defaults/field

I need to chage the validation that would throw any error from server validation if any html tag is feed say <script> </script> on the text field
please let me know how to acheive it 

currently i see 2 parameter added in the form field

required             Boolean    true    
requiredMessage         String        Please enter name


server validation for removing html tag from text field component

 

Thanks,

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by edubey

This is the path for /libs/foundation/components/form/defaults/field/servervalidation.jsp for jsp file

Override this in your project and implement your logic.

More ever I would suggest you to add some listener so that your clientside validation will also be strong.

3 replies

edubey
edubeyAccepted solution
New Participant
October 20, 2015

This is the path for /libs/foundation/components/form/defaults/field/servervalidation.jsp for jsp file

Override this in your project and implement your logic.

More ever I would suggest you to add some listener so that your clientside validation will also be strong.

New Participant
October 20, 2015

To overlay I  didnot find the servervalidation.jsp under /libs/foundation/components/form/text/text.jsp.

Please let me know   how to proceed

smacdonald2008
New Participant
October 20, 2015

To do this - you need to overlay the text and form field and then modify the servervalidation.jsp. Never modify content under /libs.