Title: What validation should i use for javascript?
Last modified: August 20, 2016

---

# What validation should i use for javascript?

 *  [yochi](https://wordpress.org/support/users/yochi/)
 * (@yochi)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/what-validation-should-i-use-for-javascript/)
 * Hello,
 * I’m creating a function where i can save tracking code like Google Analytics 
   and then output it into <head>.
 * I wonder what validation it is clever to use when saving the code?
 * Google Analytics code is inline: <script>GoogleAnalyticsCodeHere</script>
 * I think i must save everything including the <script> tags.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/what-validation-should-i-use-for-javascript/#post-2610997)
 * Start by reviewing [Data_Validation](http://codex.wordpress.org/Data_Validation).
 *  Thread Starter [yochi](https://wordpress.org/support/users/yochi/)
 * (@yochi)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/what-validation-should-i-use-for-javascript/#post-2611051)
 * I have been reading that article. But i must say i’m not sure if i should look
   at the input or output validation, and which one is the best for me.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘What validation should i use for javascript?’ is closed to new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [validation](https://wordpress.org/support/topic-tag/validation/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 2 replies
 * 2 participants
 * Last reply from: [yochi](https://wordpress.org/support/users/yochi/)
 * Last activity: [14 years, 2 months ago](https://wordpress.org/support/topic/what-validation-should-i-use-for-javascript/#post-2611051)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
