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) {
163163 if ( next_schema . hasOwnProperty ( '$ref' ) )
164164 next_schema = this . getRef ( next_schema . $ref ) ;
165165
166+ if ( schema . hasOwnProperty ( 'required' ) && Array . isArray ( schema . required ) ) {
167+ if ( schema . required . indexOf ( key ) > - 1 )
168+ next_schema [ 'required' ] = true ;
169+ }
170+
166171 let next_type = normalizeKeyword ( next_schema . type ) ;
167172
168173 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) {
395395 if ( schema_keys [ key ] === undefined )
396396 removable = true ;
397397
398+ if ( schema . hasOwnProperty ( 'required' ) && Array . isArray ( schema . required ) ) {
399+ if ( schema . required . indexOf ( key ) > - 1 )
400+ schemaValue [ 'required' ] = true ;
401+ }
402+
398403 let nextArgs = {
399404 data : value ,
400405 schema : schemaValue ,
You can’t perform that action at this time.
0 commit comments