mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-12-21 15:59:48 +01:00
Feature/unicode groupname validation (#1600)
Allow all UTF-8 characters except URL identifiers as user and group names and for namespaces. Fixes #1513 Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
This commit is contained in:
@@ -37,6 +37,7 @@ type Props = {
|
||||
onReturnPressed?: () => void;
|
||||
validationError?: boolean;
|
||||
errorMessage?: string;
|
||||
informationMessage?: string;
|
||||
disabled?: boolean;
|
||||
helpText?: string;
|
||||
className?: string;
|
||||
@@ -86,6 +87,7 @@ class InputField extends React.Component<Props> {
|
||||
value,
|
||||
validationError,
|
||||
errorMessage,
|
||||
informationMessage,
|
||||
disabled,
|
||||
label,
|
||||
helpText,
|
||||
@@ -93,7 +95,12 @@ class InputField extends React.Component<Props> {
|
||||
testId
|
||||
} = this.props;
|
||||
const errorView = validationError ? "is-danger" : "";
|
||||
const helper = validationError ? <p className="help is-danger">{errorMessage}</p> : "";
|
||||
let helper;
|
||||
if (validationError) {
|
||||
helper = <p className="help is-danger">{errorMessage}</p>;
|
||||
} else if (informationMessage) {
|
||||
helper = <p className="help is-info">{informationMessage}</p>;
|
||||
}
|
||||
return (
|
||||
<div className={classNames("field", className)}>
|
||||
<LabelWithHelpIcon label={label} helpText={helpText} />
|
||||
|
||||
Reference in New Issue
Block a user