mirror of
https://github.com/usebruno/bruno.git
synced 2024-12-23 15:19:01 +01:00
Support request name with "index" in the name if index is not separated
This commit is contained in:
parent
ae78ed36ef
commit
21536f9a27
@ -30,7 +30,10 @@ const NewRequest = ({ collection, item, isEphemeral, onClose }) => {
|
|||||||
.test({
|
.test({
|
||||||
name: 'requestName',
|
name: 'requestName',
|
||||||
message: 'The request name "index" is reserved in bruno',
|
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) => {
|
onSubmit: (values) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user