Support request name with "index" in the name if index is not separated

This commit is contained in:
Sebastien Dionne 2023-10-07 15:28:17 -04:00
parent ae78ed36ef
commit 21536f9a27

View File

@ -30,7 +30,10 @@ const NewRequest = ({ collection, item, isEphemeral, onClose }) => {
.test({
name: 'requestName',
message: 'The request name "index" is reserved in bruno',
test: (value) => value && !value.trim().toLowerCase().includes('index')
test: (value) => {
const regex = /(\s|^)\W*index\W*(\s|$)/i;
return value && !regex.test(value);
}
})
}),
onSubmit: (values) => {