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

【建议】不同场景使用的是规则名而非字段名。 #57

Open
Packmini opened this issue Aug 19, 2022 · 0 comments
Open

【建议】不同场景使用的是规则名而非字段名。 #57

Packmini opened this issue Aug 19, 2022 · 0 comments
Assignees

Comments

@Packmini
Copy link

类似这样的设计,

$rules = [
  'rule0'=>['field0', 'validator'],
  'rule1'=>['field1', 'validator'],
  'rule2'=>['field2', 'validator']
]

$scenes = [
  'scene0'=>['rule0', 'rule3'],
  'scene1'=>['rule1', 'rule3'],
]

如此,即可取代on的设计,在使用的时候更加灵活

@inhere inhere self-assigned this Aug 19, 2022
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