Parses a string and verifies it is a valid package version number.
Valid formats: X.Y.Z or vX.Y.Z, where X, Y, and Z are non-negative integers.
X.Y.Z
vX.Y.Z
The version string to parse.
Optional
Extra options to apply.
The validated version number, prefixed with v if it was not already.
v
This function does not support the new class-based handling of VersionNumber. Please use new VersionNumber(input) instead.
new VersionNumber(input)
If the input is not a valid version number.
Parses a string and verifies it is a valid package version number.
Valid formats:
X.Y.ZorvX.Y.Z, where X, Y, and Z are non-negative integers.