fix Issue 12740 - DMD accepts invalid version syntax
Merge pull request #585 from 9rnsr/fix12740

Issue 12740 - DMD accepts invalid version syntax