commit | 0d61ec006d113c433ceb49a9e4719c35f3b1b552 | [log] [tgz] |
---|---|---|
author | Mykola Mandra <mykola.mandra@cloudsoft.io> | Thu Jul 28 10:03:44 2022 +0100 |
committer | Mykola Mandra <mykola.mandra@cloudsoft.io> | Thu Jul 28 10:03:44 2022 +0100 |
tree | 485d68020450e5e934fada17966bc9236b22ea20 | |
parent | 55b94d74e374cd53ba2da2fb2194c8ddd1e1cb50 [diff] |
Test constraint regex value in composer as a full line match, same as in the backend Signed-off-by: Mykola Mandra <mykola.mandra@cloudsoft.io>
diff --git a/ui-modules/blueprint-composer/app/components/providers/blueprint-service.provider.js b/ui-modules/blueprint-composer/app/components/providers/blueprint-service.provider.js index 4307b4d..270176b 100644 --- a/ui-modules/blueprint-composer/app/components/providers/blueprint-service.provider.js +++ b/ui-modules/blueprint-composer/app/components/providers/blueprint-service.provider.js
@@ -487,7 +487,8 @@ } break; case 'regex': - if (isSet() && !(new RegExp(args).test(val()))) { + let matchFullLine = '^' + args + '$'; + if (isSet() && !(new RegExp(matchFullLine).test(val()))) { message = `<samp>${config.name}</samp> does not match the required format: <samp>${args}</samp>`; } break;