andrewhathaway / Winterfell

Generate complex, validated and extendable JSON-based forms in React.
http://winterfell.andrewhathaway.net
MIT License
785 stars 116 forks source link

Email input box jumps around whilst typing #1

Closed barnc closed 9 years ago

barnc commented 9 years ago

Hey up it's Barn, lib looks really good btw!

Just a minor UX thing I noticed when trying the demo, email box jumps up and down as my input goes from empty -> invalid -> valid.

I guess you may want to either display validation below, add a delay which resets on input, or add a validateOn option which would let me validate email on blur.

andrewhathaway commented 9 years ago

I've noticed this and I've been pondering the solution, the validateOn definitely sounds like a useful feature either way. Possibly a errorPosition option or something too.

Thanks for the issue, I'll get on it! :)

MrRio commented 9 years ago

Well designed forms that validate as-you-type will display errors in way that doesn't shift the input.

Adding validateOn and errorPosition is probably extra cruft.

andrewhathaway commented 9 years ago

@MrRio Bearing in mind that Winterfell does not dictate the styling of the form, this is still completely possible.

However, keeping in the flexible mindset. I think it might be worth implementing the validateOn feature and setting the default to blur.

MrRio commented 9 years ago

Yeah that'd do it.

It looks really awesome btw On Thu, 27 Aug 2015 at 10:21, Andrew Hathaway notifications@github.com wrote:

@MrRio https://github.com/MrRio Bearing in mind that Winterfell does not dictate the styling of the form, this is still completely possible.

However, keeping in the flexible mindset. I think it might be worth implementing the validateOn feature and setting the default to blur.

— Reply to this email directly or view it on GitHub https://github.com/andrewhathaway/Winterfell/issues/1#issuecomment-135360244 .

andrewhathaway commented 9 years ago

I think its a good option from a flexibility point of view!

Appreciate it! :beers: soon.

MrRio commented 9 years ago

👍👍 On Thu, 27 Aug 2015 at 23:25, Andrew Hathaway notifications@github.com wrote:

Closed #1 https://github.com/andrewhathaway/Winterfell/issues/1 via 5d911d6 https://github.com/andrewhathaway/Winterfell/commit/5d911d600a23ccabbf038e0f4df21ef2d5491290 .

— Reply to this email directly or view it on GitHub https://github.com/andrewhathaway/Winterfell/issues/1#event-394534617.