Skip to content

Create own implementation ​

Requirements for an implementation:

  1. It supports all validation rules described in the specification.
  2. It supports rules aliasing.
  3. It returns the error codes described in the specification.
  4. It is easy to add your own rules.
  5. It passes the test suite.

Tips ​

  • Look at the JavaScript implementation: it is the reference implementation, and its rules are small, self-contained functions.
  • Copy the test_suite directory into your repository, or add this repository as a git submodule, and run it in your CI.
  • Follow the conventions of your language for the API (registerAliasedRule in JavaScript, register_aliased_rule in Perl, and so on), but keep the rules format and the error codes exactly as in the specification.

Publish it ​

When your implementation passes the test suite, add it to the implementations list. If you add a runner to the conformance/ directory, the site will show your test suite results too.