# Other Languages > jQuery >  [RESOLVED] User input msg validation

## akhileshbc

Hi guys  :wave: 

I have setup a jQuery way to submit messages by the users. And it works fine. But I want to include a clientside validation on the "msg" being submitted by the user (already coded server side validation).

What I want to validate is, it shouldn't contain any HTML tags or scripts or anything harmful.

Any ideas or code bits ?

Note: I'm very much new to jQuery  :Smilie: 

 :wave:

----------


## szlamany

Did you ever get an answer to your problem?

----------


## akhileshbc

I found that, there's some premade plugins for jQuery to do the validations. But didn't checked those.

I'm just using the test() method to validate using regex.


```
var regex=/^[a-zA-Z]$/;
if(!regex.test($('#username')))
{
  //failed. show an error and return
  return
}
```

 :wave:

----------


## tr333

Maybe you could do something with John Resig's HTML Parser to check for any HTML in the text?

----------


## akhileshbc

Thanks  :wave:

----------

