Skip to content

isValid Check Does Not Comply To Semver Spec  #23

@jonmchan

Description

@jonmchan

The following strings should fail according to semver spec:

A normal version number MUST take the form X.Y.Z where X, Y, and Z are non-negative integers, and MUST NOT contain leading zeroes. http://semver.org/#spec-item-2

_invalidList = @[@"1", # missing minor and patch  
                           @"1.1", # missing patch
                           @"1.1.0001" # must not contain leading zeroes.
                          ];

isValid check should be made more strict to fall in line with the semver specification. Currently, each of these strings pass isValid validation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions