# Input validation

**URL:** https://meta.discourse.org/t/input-validation/46126
**Category:** Development
**Created:** [June 21, 2016, 1:32pm UTC](https://meta.discourse.org/t/input-validation/46126 "2016-06-21T13:32:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![piratdavid](https://avatars.discourse-cdn.com/v4/letter/p/ba9def/32.png) [@piratdavid](https://meta.discourse.org/u/piratdavid)
#### Post date: [June 21, 2016, 1:32pm UTC](https://meta.discourse.org/t/input-validation/46126/1 "2016-06-21T13:32:17Z")

</div>

Could someone point me in the right direction for input validation of fields in a plugin. Thanx in advance. I’d like to have the same popup-tip behavior as a missing required field in the post composer.

/david

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [June 21, 2016, 5:47pm UTC](https://meta.discourse.org/t/input-validation/46126/2 "2016-06-21T17:47:28Z")

</div>

Have a look at

1. [https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/components/input-tip.js.es6](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/components/input-tip.js.es6)
2. [https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/components/popup-input-tip.js.es6](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/components/popup-input-tip.js.es6)

Basic usage is something like

```plaintext
# In your templates
{{popup-input-tip validation=<some computed property to show/hide the tip>}}
{{input-tip validation=<some computed property to show/hide the tip>}}

```

---

<div class="post-metadata">

### Author: ![piratdavid](https://avatars.discourse-cdn.com/v4/letter/p/ba9def/32.png) [@piratdavid](https://meta.discourse.org/u/piratdavid)
#### Post date: [June 22, 2016, 7:44am UTC](https://meta.discourse.org/t/input-validation/46126/3 "2016-06-22T07:44:10Z")

</div>

I have tried this and it works great for validating a property continuously while writing. However, I would like to just check if it is set when I press save. Could I trigger the validation in an event action somehow?
