On Mon, Aug 26, 2019 at 12:21 PM Dushan Silva <[email protected]> wrote:
> adding @APIM Team <[email protected]> > > On Mon, Aug 26, 2019 at 12:20 PM Dushan Silva <[email protected]> wrote: > >> Hi Kasun, >> I'm +1 for using joi. It seems very versatile and fits our needs >> perfectly. One Suggestion I would like to add is that since in joi we will >> be defining an object schema first , I think its better to maintain these >> schemas separately in a separate folder. This will be much easier to find >> and maintain rather than defining these schemas within the components. >> Since joi is just pure Javascript I think will be easily achievable. >> >> Thanks >> >> On Fri, Aug 23, 2019 at 12:44 PM Kasun Thennakoon <[email protected]> >> wrote: >> >>> Hi All, >>> >>> So far we have been doing the validation manually in ad-hoc manner. It >>> seems that this approach is not scalable. For example, We had to write URL >>> , email , ip address etc validation patterns manually. >>> So I think it's better to integrate a third-party library that is >>> dedicated to the validation task. >>> So we explored the available libraries and found these widely adopted >>> libraries. >>> >>> - Joi[1][2] >>> - Validator.js[3] >>> - V8n[4] >>> >>> ... many more <https://github.com/topics/validation?l=javascript>[4] >>> >>> The above top 3 picks are pure validation libraries, Not related to >>> ReactJs. >>> >>> Out of those, IMO Joi[1] fits with our requirements well. >>> Here is a sample implementation >>> <https://codesandbox.io/s/stoic-mcnulty-9kcmj>[5] with material UI >>> elements. >>> >>> Please give your feedback. >>> >>> [1]: https://github.com/hapijs/joi >>> [2]: https://github.com/hapijs/joi/blob/master/LICENSE.md >>> [3]: https://github.com/validatorjs/validator.js >>> [4]: https://github.com/imbrn/v8n >>> [5]: https://codesandbox.io/s/stoic-mcnulty-9kcmj >>> >>> -- >>> *Kasun Thennakoon* | Senior Software Engineer | WSO2 Inc. >>> (m) +94 711661919 | (w) +94 11 214 5345 | (e) [email protected] >>> GET INTEGRATION AGILE >>> Integration Agility for Digitally Driven Business >>> >> >> >> -- >> Best Regards >> Dushan Silva >> Software Engineer >> >> *WSO2, Inc. * >> >> lean . enterprise . middleware >> Mob: +94 774 979042 >> > > > -- > Best Regards > Dushan Silva > Software Engineer > > *WSO2, Inc. * > > lean . enterprise . middleware > Mob: +94 774 979042 > -- Best Regards Dushan Silva Software Engineer *WSO2, Inc. * lean . enterprise . middleware Mob: +94 774 979042
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
