mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
* Fixed regex bug in Safari * Added extra unit test
This commit is contained in:
parent
fb74c3cfeb
commit
aaed92a0a1
2 changed files with 7 additions and 1 deletions
|
@ -29,7 +29,7 @@ export const NEXT_URL_QUERY_STRING_PARAMETER = 'next';
|
|||
* - Must contain only letters, numbers, spaces, punctuation and printable symbols.
|
||||
* - Must not contain leading or trailing spaces.
|
||||
*/
|
||||
export const NAME_REGEX = /^(?! )[a-zA-Z0-9 !"#$%&'()*+,\-./\\:;<=>?@\[\]^_`{|}~]+(?<! )$/;
|
||||
export const NAME_REGEX = /^(?! )[a-zA-Z0-9 !"#$%&'()*+,\-./\\:;<=>?@\[\]^_`{|}~]*[a-zA-Z0-9!"#$%&'()*+,\-./\\:;<=>?@\[\]^_`{|}~]$/;
|
||||
|
||||
/**
|
||||
* Maximum length of usernames and role names.
|
||||
|
|
|
@ -88,6 +88,12 @@ describe('CreateUserPage', () => {
|
|||
|
||||
await findAllByText(/Username must not contain leading or trailing spaces/i);
|
||||
|
||||
fireEvent.change(await findByLabelText('Username'), {
|
||||
target: { value: 'username_with_trailing_space ' },
|
||||
});
|
||||
|
||||
await findAllByText(/Username must not contain leading or trailing spaces/i);
|
||||
|
||||
fireEvent.change(await findByLabelText('Username'), {
|
||||
target: { value: '€' },
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue