How can i validate input to stop users from add special characters like html code or any code for security wise
example:
Discussion posts and replies are publicly visible
I found this function striphtml() , but if i need fix to be common because it will be big task to revisit all text component
hi mohamed,
can you please explain more about your scenario? The information are super limited.Where does somebody entering what kind of information for what purpuse exactly?
Are you talking about sail forms?
I need to prevent end user to write inputs contains tags like <script>ssl</script> on paragraph or text box , need to ignore any
tags for security wise
do you want to prevent the user from entering or do you want to clean the inserted text?Validation vs formating inserted text
Any one can be common without revisit all text and paragraph components
"without revisit all text and paragraph components "what do you mean by that? I just try to understand the requirements.The user shouldn't have to check his entries? or the designer shouldn't check his implementation for all textfields?
Idea1 : use the validation field of the paragraph / text fields
if( count( remove( a!forEach( items:{ "<",">","/" }, expression:find( fv!item, yourtext, 1 ) ), wherecontains( 0, a!forEach( items:{ "<",">","/" }, expression:find( fv!item, yourtext, 1 ) ), ) ) )=0, {}, "please don't enter '>','<' or'/'" )
format the inserted texthttps://docs.appian.com/suite/help/20.4/fnc_text_cleanwith.htmlhttps://docs.appian.com/.../fnc_text_stripwith.html
Mohamed Kassem said:Any one can be common without revisit all text and paragraph components
Unless you've already implemented some sort of universal text validation and/or text cleanup rule that you've used in your text fields everywhere, then i believe there isn't a solution that won't require you to go around to all your existing text fields and add it.
One technique i've seen in use that sort of gets around this is, wrapping each different component (i.e. the text field) in its own component wrapper interface, i.e. "MYSYSTEM_Component_textField()", and then only using that on other forms instead of the vanilla a!textField(). That way when a universal change is required, it can just be added to the wrapper instead of needing to edit the potential hundreds of uses elsewhere. Of course, this method has certain drawbacks as well, but in this situation would be handy.
thank you so much
thank you so much I will try