File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,11 @@ export default function DataValidator(schema) {
163
163
if ( next_schema . hasOwnProperty ( '$ref' ) )
164
164
next_schema = this . getRef ( next_schema . $ref ) ;
165
165
166
+ if ( schema . hasOwnProperty ( 'required' ) && Array . isArray ( schema . required ) ) {
167
+ if ( schema . required . indexOf ( key ) > - 1 )
168
+ next_schema [ 'required' ] = true ;
169
+ }
170
+
166
171
let next_type = normalizeKeyword ( next_schema . type ) ;
167
172
168
173
let next_validator = this . getValidator ( next_type ) ;
Original file line number Diff line number Diff line change @@ -395,6 +395,11 @@ export function getObjectFormRow(args) {
395
395
if ( schema_keys [ key ] === undefined )
396
396
removable = true ;
397
397
398
+ if ( schema . hasOwnProperty ( 'required' ) && Array . isArray ( schema . required ) ) {
399
+ if ( schema . required . indexOf ( key ) > - 1 )
400
+ schemaValue [ 'required' ] = true ;
401
+ }
402
+
398
403
let nextArgs = {
399
404
data : value ,
400
405
schema : schemaValue ,
You can’t perform that action at this time.
0 commit comments