I am using struts 1.2. I need to design such verification that the letter %, /,?, & Lt ;, & gt; reject. As you can identify the last two letters, you need to escape, but I am unable to find any specific rules in strips.
string str; // String to check - Load it from the form with the value .... (Stroke Contents ("%") || Stront Contains ("/") || Stront Contains ("?") Str.contains ("& Lt;") || str.contains ("& gt;")) {// string contains invalid characters} Other {// vaild chars} in string} Also regex is not included, and there is no need to avoid checkers - although this can be a better way of doing.
Comments
Post a Comment