Validate banch names

This commit is contained in:
René Pfeuffer
2020-10-29 13:09:17 +01:00
parent 5f21f1a97d
commit c2a7ed8869
8 changed files with 42 additions and 18 deletions

View File

@@ -124,15 +124,13 @@ class BranchForm extends React.Component<Props, State> {
handleSourceChange = (source: string) => {
this.setState({
...this.state,
source
});
};
handleNameChange = (name: string) => {
this.setState({
nameValidationError: !validator.isNameValid(name),
...this.state,
nameValidationError: !validator.isBranchValid(name),
name
});
};