Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

バリデーション機能がFormSchemaにない #2

Open
KOBA789 opened this issue Jan 20, 2015 · 6 comments
Open

バリデーション機能がFormSchemaにない #2

KOBA789 opened this issue Jan 20, 2015 · 6 comments
Assignees

Comments

@KOBA789
Copy link
Member

KOBA789 commented Jan 20, 2015

form_schema.rb の create_schema メソッドあたりでやるといい気がします

@polamjag
Copy link
Contributor

名前のややこしみを感じるので validate とか validate_with とかの方がいい気がする (validate_with は長ったらしいけど名前衝突しなさそう)

@KOBA789
Copy link
Member Author

KOBA789 commented Jan 20, 2015

別のメソッドに分けるのはアリですね

@polamjag
Copy link
Contributor

いっぱいメソッド生やすと複数叩いた時にどうなるんだみたいな感じがするので、Symbol で email とかありがちなルール呼び出せて、Regexp 来たらそれでやるし Proc 来たらそれでやるみたいな感じとかにすると良いような気もしてきた (引数の話)

@KOBA789
Copy link
Member Author

KOBA789 commented Jan 20, 2015

もはやコンビネータが欲しい

@polamjag
Copy link
Contributor

まあ Proc 取れるし、そういう感じで

メソッド名、validate_with にしまふ

@KOBA789
Copy link
Member Author

KOBA789 commented Jan 20, 2015

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants