mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
Merge pull request #1428 from appwrite/fix-check-chars-project-id
Change regex for custom project id
This commit is contained in:
2 files changed
+4
-4
No files matched your search
@@ -8,7 +8,7 @@
|
||||
|
||||
let element: HTMLInputElement;
|
||||
let icon = 'info';
|
||||
const pattern = String.raw`^[a-zA-Z0-9][a-zA-Z0-9._\-]*$`;
|
||||
const pattern = String.raw`^[a-zA-Z0-9][a-zA-Z0-9\-]*$`;
|
||||
|
||||
onMount(() => {
|
||||
if (element && autofocus) {
|
||||
@@ -55,6 +55,6 @@
|
||||
class="u-cross-center u-line-height-1 u-color-text-gray"
|
||||
aria-hidden="true" />
|
||||
<span class="text u-line-height-1-5">
|
||||
Allowed characters: alphanumeric, non-leading hyphen, underscore, period
|
||||
Allowed characters: alphanumeric and non-leading hyphen
|
||||
</span>
|
||||
</div>
|
||||
@@ -3,9 +3,9 @@ import { render } from '@testing-library/svelte';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { InputId } from '../../../src/lib/elements/forms';
|
||||
|
||||
const validStrings = ['valid_string', 'valid-string', 'valid.string', 'validstring123', 'valid_'];
|
||||
const validStrings = ['valid-string', 'validstring', 'validstring123', 'valid-'];
|
||||
|
||||
const invalidStrings = ['-invalid', '.invalid', '_invalid'];
|
||||
const invalidStrings = ['-invalid', '.invalid', 'in_valid', 'in.va.lid'];
|
||||
|
||||
test('shows id input', () => {
|
||||
const { getByPlaceholderText } = render(InputId);
|
||||
|
||||
Reference in new issue
Block a user