Created
July 20, 2015 05:59
-
-
Save hufeng/288aa7755d4bc62760e5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
结合iflux的架构特点怎么才能设计好一个真正好用的校验库,确实有点考验人。 | |
之前的iflux解决一部分校验问题,但是也暴露了一些问题。 | |
解决问题的问题: | |
1. 以store为中心,校验声明式,配置规则和message,错误信息自动绑定到store | |
2. 异步直接走正常的逻辑,不直接支持 | |
但是根据我们的业务场景也暴露了一些问题, | |
1. 动态的校验,校验的规则一开始并不清楚,而是随着业务的变化而变化(坑爹啊) | |
2. 可选校验,比如电话号码,手机号码任选其一 这种类型的校验 | |
结合这些问题,还是需要对我们的校验库再次梳理下,支持的场景。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment