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

feat(FormInput): add validation properties#386

Merged
AaronCoplan merged 1 commit into
tabler:masterfrom
nating:input-validation
Jan 29, 2019
Merged

feat(FormInput): add validation properties#386
AaronCoplan merged 1 commit into
tabler:masterfrom
nating:input-validation

Conversation

@nating

@nating nating commented Dec 7, 2018

Copy link
Copy Markdown
Contributor

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

nating commented Jan 11, 2019

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
Contributor

Please, I need it.

@AaronCoplan

Copy link
Copy Markdown
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
Copy Markdown
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants