Skip to content

Validators can't contain dashes #4

Open
@marcbachmann

Description

@marcbachmann
    jscheme = require('jscheme').new()
    jscheme.add 'min-length-5', (val) ->
      val.length >= 5

    jscheme.add 'contact',
      name: 'string, min-length-5'

jscheme parses the validator string min-length-5 into min,
which results in the error 'contact.name: missing validator min',

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions