jurassix / react-validation-mixin

Simple validation mixin (HoC) for React.
MIT License
282 stars 38 forks source link

it should be able to set other joiOptions #21

Closed blackbing closed 9 years ago

blackbing commented 9 years ago

@jurassix , I need to set options of Joi, especially on the language option.

I do notice that you have set the joiOptions https://github.com/jurassix/react-validation-mixin/blob/master/JoiValidationStrategy.js#L8, but it have no way to set other options on it. so I added joiOptions to set it. I don't know if it is follow your coding guideline, hope you can take some time to review it. Thank you very much.

jurassix commented 9 years ago

Thanks for the contribution. In #14 we are planning to loosely couple Joi from this library to support other validation engines. I need to expose additional options in a way that is generic. I'll probably make some changes to your PR in the process to unify the API.

blackbing commented 9 years ago

I see. I've use it a lot in my project. I am glad to help to test if you need some real case in-use. Thanks.

jurassix commented 9 years ago

@blackbing This library now supports providing joiOptions directly to the underly strategy as of v5.0.

Read the docs here

blackbing commented 9 years ago

Awesome, I have migrated to 5.0 perfectly. nice work, thank you.