Skip to content

How to setup custom validation for incubator.TextField #1830

Answered by ethanshar
navxio asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @navxio
You are using the old implementation of TextField, you can follow the warnings you get to migrate to the new implementation.

Anyway, since we're in the middle of migration, this might be a little confusing.
You have 2 options:

  • Pass the migrate prop. This will get you the new TextField implementation.
  • Use Incubator.TextField directly (e.g <Incubator.TextField ... .>)

Regardless, notice that in order to a separate validate message for each validation you can pass an array of validate messages (:

good luck

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@navxio
Comment options

Answer selected by ethanshar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants