Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

feat(FormInput): add validation properties #386

Merged
merged 1 commit into from
Jan 29, 2019

Conversation

nating
Copy link
Contributor

@nating nating commented Dec 7, 2018

Changes:

This PR adds the following validation properties to the FormInput component:

  • required
  • min
  • max
  • minlength
  • maxlength

Demonstration:

Here is a GIF in which FormInput components are given these properties and inputs that are not valid according to these properties are shown to resolve in errors when the form is submit.

PS. (The GIF slowed down with the compression / format conversion somewhere along the way so it's a bit slow)

@nating
Copy link
Contributor Author

nating commented Jan 11, 2019

Hey guys, just checking in to see about this getting merged. If there's something wrong with it then no worries. I'm aware that it potentially may be "more tabler" to handle this stuff in Javascript.

@NickAlvesX
Copy link
Contributor

Please, I need it.

@AaronCoplan
Copy link
Contributor

Hello @nating @NickAlvesX I apologize for taking so long to get to this. I have been a bit busier than usual lately. I am going to merge this for now, but I do agree with @nating that there might be a friendlier way to do this with Javascript as opposed to relying on html form properties. So that may be something to explore in the future.

@AaronCoplan AaronCoplan merged commit 9e3272e into tabler:master Jan 29, 2019
@jonthomp
Copy link
Contributor

🎉 This PR is included in version 1.28.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4 participants