Skip to content

Commit

Permalink
Merge pull request #2586 from swaterkamp/ProcNameRegExUmlauts
Browse files Browse the repository at this point in the history
Allow umlauts and ß in object names
  • Loading branch information
sarahd93 authored Nov 19, 2020
2 parents f2e5461 + 43f7f5f commit 18ce986
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Added option for "Start Task" event upon "New SecInfo arrived" condition in alerts dialog [#2418](https://github.com/greenbone/gsa/pull/2418)

### Changed
- Allow äüöÄÜÖß in form validation rule for "name" [#2586](https://github.com/greenbone/gsa/pull/2586)
- Show "Filter x matches at least y results" condition to task events in alert dialog [#2580](https://github.com/greenbone/gsa/pull/2580)
- Always send sort=name with delta report request filters [#2570](https://github.com/greenbone/gsa/pull/2570)
- Changed trash icon to delete icon on host detailspage [#2565](https://github.com/greenbone/gsa/pull/2565)
Expand Down
5 changes: 3 additions & 2 deletions gsa/src/web/components/form/useFormValidation.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,9 @@ const useFormValidation = (
export const shouldBeNonEmpty = (string = '') => string.trim().length > 0;
export const shouldBeValidPassword = (password = '') => password.length > 5;
export const shouldBeValidName = (string = '') =>
string.match(/^[.#\-_ ,/a-z0-9]+$/i) !== null; // this is analogue to the
// regex in gsad.c for 'name'
string.match(/^[.#\-_ ,/a-z0-9äüöÄÜÖß]+$/i) !== null; // this is analogue to the
// regex in gsad.c for 'name' - it needs to be checked, whether :alnum: cotains
// more than the characters above
export const VALID_NAME_ERROR_MESSAGE = _l(
'The name must include at least one alphanumeric character or one of .,-/_# and space.',
);
Expand Down

0 comments on commit 18ce986

Please sign in to comment.