gcanti / tcomb-form

Forms library for react
https://gcanti.github.io/tcomb-form
MIT License
1.16k stars 136 forks source link

validate as you type? #366

Closed matthewmueller closed 7 years ago

matthewmueller commented 7 years ago

I feel like this is possible, but I haven't figured it out yet. Basically as you type, check against the domain to see if it's valid?

Given this domain

var user = t.struct({
  firstName: t.String,
  lastName: t.String
}

Is it possible to validate just firstName?

gcanti commented 7 years ago

https://github.com/gcanti/tcomb-form/blob/master/GUIDE.md#accessing-fields

matthewmueller commented 7 years ago

ah there it is – thanks!