Skip to content

[RFC] egg-validate support i18n and auto load rule file #1672

@atian25

Description

@atian25

Background

Currently, egg-validate don't support i18n:

Proposal

i18n

  • egg-validate will use egg-i18n as optionalDependencies
  • change Parameter's translate to ctx.gettext which provide by egg-i8n

rule file

  • auto load app/validate/**/*.js, and register to app.validator.addRule(type, fn)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions