mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-08 14:35:03 +00:00
Environment's as tabs (#6407)
* add: env's as tabs * fix: test * fix: tests * fixes * fix: test * fixes * fixes * fix * fix: styling * fixes
This commit is contained in:
@@ -39,17 +39,17 @@ export const validateNameError = (name) => {
|
||||
}
|
||||
|
||||
if (!firstCharacter.test(name[0])) {
|
||||
return 'Invalid first character.';
|
||||
return `Special characters aren't allowed in the name. Invalid character '${name[0]}'.`;
|
||||
}
|
||||
|
||||
for (let i = 1; i < name.length - 1; i++) {
|
||||
if (!middleCharacters.test(name[i])) {
|
||||
return `Invalid character '${name[i]}' at position ${i + 1}.`;
|
||||
return `Special characters aren't allowed in the name. Invalid character '${name[i]}'.`;
|
||||
}
|
||||
}
|
||||
|
||||
if (!lastCharacter.test(name[name.length - 1])) {
|
||||
return 'Invalid last character.';
|
||||
return `Special characters aren't allowed in the name. Invalid character '${name[name.length - 1]}'.`;
|
||||
}
|
||||
|
||||
return '';
|
||||
|
||||
Reference in New Issue
Block a user