GUI: Versioned Storages - VS create dialog: Name field validation.
Predefined structure validation fix
@@ -111,10 +111,16 @@ class VersionedStorageDialog extends React.Component {
{...formItemLayout}
>
{getFieldDecorator('name', {
- rules: [{
+ rules: [
+ {
required: true,
message: 'Please input repository name'
- }]
+ },
+ {
+ pattern: /^[\da-zA-Z.\-_]+$/,
+ message: 'Repository name can contain only letters, digits, "_", "-", and "."'
+ }
+ ]
})(
<Input
onPressEnter={this.handleSubmit}
@@ -150,7 +156,7 @@ class VersionedStorageDialog extends React.Component {
rules: [
{
pattern: /^[\da-zA-Z_\n\-/]+$/,
- message: 'Path can contain only letters, digits, spaces and "- _ /" symbols'
+ message: 'Path can contain only letters, digits, "_", "-", "/" and "."'
}
],
initialValue: ''
