Merge pull request #456 from survivant/feature/request-indexname

Feature/request indexname
This commit is contained in:
Anoop M D 2023-10-09 07:00:50 +05:30 committed by GitHub
commit 2d149d94ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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) => {