how to validate input text to ignore special characters

How can i validate input to stop users from add special characters like html code or any code for security wise 

example:

        <tr>
            <td>WX - WEATHER</td>
            <td>a1</td>
        </tr>
        <tr>
            <td>SFC VIS - SURFACE VISIBILITY</td>
            <td>a2</td>
        </tr>

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to Mohamed Kassem
    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.

Children