web3-nomad / accelerator-defi-EIP-ui

accelerator-defi-EIP UI
https://eip.zilbo.com
Apache License 2.0
0 stars 1 forks source link

Introduce forms validation #74

Open dchernokur opened 3 months ago

dchernokur commented 3 months ago

Would be nice to have some basic inputs validation for our forms. I had a nice experience using Yup library with Formik we currently use. One of such helpful validations would be running ethers.isAddress(form.values.address) on the inputs expecting evm addresses to be pasted.

Additional things to have:

dchernokur commented 2 months ago

This is important for dynamic compliance modules forms when deploying TREX token to avoid the situation when we could pass the selected module address, but empty settings for respective module (where applicable). For example choosing requiresNftModule but not adding encoded settings part due to absent form validation not preventing us from submitting the form.