Skip to content

Commit

Permalink
Fixed issue with groups regex
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Jun 13, 2022
1 parent 1eb9a5d commit f89dab4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions ui/src/app/admin/container/NewGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,15 @@ export function NewGroup() {
{(schema) =>
<FormManager initial={{}}>
{(data, errors) =>
<GroupForm
<>
<GroupForm
group={data}
errors={errors}
schema={schema}
loading={loading}
onSave={(data) => save(data)}
onCancel={() => cancel()} />}
onCancel={() => cancel()} />
</>}
</FormManager> }
</Schema>
</div>
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/admin/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function useGroupUiSchema () {

export function useGroupUiValidator() {
return (formData, errors) => {
if (!isNil(formData?.validationRegex)) {
if (!isNil(formData?.validationRegex) && formData?.validationRegex !== '') {
const isValid = isValidRegex(formData.validationRegex);
if (!isValid) {
errors.validationRegex.addError('message.invalid-regex-pattern');
Expand Down

0 comments on commit f89dab4

Please sign in to comment.