エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
ここにツイート内容が記載されます https://b.hatena.ne.jp/URLはspanで囲んでください
Twitterで共有ONにすると、次回以降このダイアログを飛ばしてTwitterに遷移します
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
package main import ( "fmt" "gopkg.in/go-playground/validator.v9" ) type A struct { String string... package main import ( "fmt" "gopkg.in/go-playground/validator.v9" ) type A struct { String string `validate:"required"` } type B struct { Int int64 `validate:"custom=A.String"` } type C struct { A B } func main() { v := validator.New() v.RegisterValidation("custom", customFunc) c := &C{} // Key: 'C.B.Int' Error:Field validation for 'Int' failed on the 'custom' tag c.String = "hoge" c.Int = 3 err :