Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. if (($("#tb_standard_reason").val().trim().indexOf('<') > -1 ) || ($("#tb_standard_reason").val().trim().indexOf('&#') > -1 )) {
  2. problems += '* Please do not include any HTML characters (<, >, or &#) in the reason.<br />';
  3. }
  4.  
  5. /*
  6. <asp:CustomValidator runat="server" Display="Dynamic" ErrorMessage="<br />*Please do not include any HTML characters (<, >, or &#) in the special situation details." EnableClientScript="true" ClientValidationFunction="validateInsecureCharacters" ControlToValidate="tb_SpecialSituationDetails" />
  7. */
  8.  
  9. function validateInsecureCharacters(source, arguments) {
  10. if ((arguments.Value.indexOf('<') > -1) || (arguments.Value.indexOf('&#') > -1)) {
  11. arguments.IsValid = false;
  12. } else {
  13. arguments.IsValid = true;
  14. }
  15. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement