react-select icon indicating copy to clipboard operation
react-select copied to clipboard

Validate values when allowCreate and reject if needed

Open Shnolik opened this issue 10 years ago • 3 comments

Looking for an option to validate options created by user (eg: value must be a valid email address). Need to be able to reject the new value if it is not valid

Shnolik avatar Mar 03 '16 18:03 Shnolik

+1 - we need this as well

bradbirnbaum avatar Aug 04 '16 16:08 bradbirnbaum

By the way, I believe PR #1187 should resolve this issue. Please feel free top give the branch a spin and let me know if you have any concerns or other feedback. 😄

bvaughn avatar Sep 03 '16 03:09 bvaughn

This issue no longer exists in the 1.x code (as of PR #1187) and so I'm going to close it!

The new Creatable HOC supports a configurable isValidNewOption property that allows users to do custom validation on options. Learn more here.

Look for an updated RC with this functionality soon. 😎

bvaughn avatar Sep 04 '16 02:09 bvaughn