Verified Commit 6e06aac1 authored by Dan Jones's avatar Dan Jones
Browse files

fix: add hyphen to schema version regex

- Current regex works for dev, master and semvers
- It doesn't work for issue branches
2 merge requests!21Release v1.0.0,!18Resolve "Add hyphen to regex for version"
Pipeline #229933 failed with stages
in 1 minute and 2 seconds
......@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]
### Changed
- Add hyphen to regex for schema version to enable issue branches
## [v0.1.0] - 2023-03-24
### Added
......
......@@ -125,7 +125,7 @@ export class GenericSoarProtocol extends GenericProtocol {
* @returns {object}
*/
createValidator(schema) {
if (typeof schema === 'string' && schema.match(/^[\w.]+$/)) {
if (typeof schema === 'string' && schema.match(/^[\w.-]+$/)) {
this.loadSchema(schema).then((schema) => {
this.validator = new Validator(schema);
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment