github.com/gogf/gf/v2@v2.7.4/util/gvalid/internal/builtin/builtin_foreach.go (about) 1 // Copyright GoFrame Author(https://goframe.org). All Rights Reserved. 2 // 3 // This Source Code Form is subject to the terms of the MIT License. 4 // If a copy of the MIT was not distributed with this file, 5 // You can obtain one at https://github.com/gogf/gf. 6 7 package builtin 8 9 // RuleForeach implements `foreach` rule: 10 // It tells the next validation using current value as an array and validates each of its element. 11 // 12 // Format: foreach 13 type RuleForeach struct{} 14 15 func init() { 16 Register(RuleForeach{}) 17 } 18 19 func (r RuleForeach) Name() string { 20 return "foreach" 21 } 22 23 func (r RuleForeach) Message() string { 24 return "" 25 } 26 27 func (r RuleForeach) Run(in RunInput) error { 28 return nil 29 }