Fix relation validation
This commit is contained in:
parent
84613f3571
commit
3f7e4187cc
@ -9,7 +9,7 @@ import { FixedSizeList } from 'react-window';
|
||||
import { SortableContainer, SortableElement, SortableHandle } from 'react-sortable-hoc';
|
||||
|
||||
import { reactSelectStyles } from '../../ui';
|
||||
import { stringTemplate, validations } from '../../lib/widgets';
|
||||
import { stringTemplate } from '../../lib/widgets';
|
||||
|
||||
function arrayMove(array, from, to) {
|
||||
const slicedArray = array.slice();
|
||||
|
@ -1,6 +1,11 @@
|
||||
import controlComponent from './RelationControl';
|
||||
import previewComponent from './RelationPreview';
|
||||
import schema from './schema';
|
||||
import { validations } from '../../lib/widgets';
|
||||
|
||||
function isMultiple(field) {
|
||||
return field.get('multiple', false);
|
||||
}
|
||||
|
||||
function Widget(opts = {}) {
|
||||
return {
|
||||
@ -11,7 +16,7 @@ function Widget(opts = {}) {
|
||||
const min = field.get('min');
|
||||
const max = field.get('max');
|
||||
|
||||
if (!this.isMultiple()) {
|
||||
if (!isMultiple(field)) {
|
||||
return { error: false };
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user