Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
rjs_json_form
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
rjs_json_form
Commits
10aa38c5
Commit
10aa38c5
authored
Sep 03, 2018
by
Boris Kocherov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tv4: add support propertyNames
parent
16494021
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
jsonform/tv4.js
jsonform/tv4.js
+7
-0
No files found.
jsonform/tv4.js
View file @
10aa38c5
...
...
@@ -1059,6 +1059,11 @@ ValidatorContext.prototype.validateObjectProperties = function validateObjectPro
for
(
var
key
in
data
)
{
var
keyPointerPath
=
dataPointerPath
+
"
/
"
+
key
.
replace
(
/~/g
,
'
~0
'
).
replace
(
/
\/
/g
,
'
~1
'
);
var
foundMatch
=
false
;
if
(
schema
.
propertyNames
!==
undefined
&&
schema
.
propertyNames
!==
true
)
{
if
(
error
=
this
.
validateAllValidators
(
key
,
schema
.
propertyNames
,
keyPointerPath
))
{
return
this
.
createError
(
ErrorCodes
.
OBJECT_PROPERTY_NAMES
,
{
key
:
key
,
error
:
error
.
message
},
''
,
'
/propertyNames
'
,
null
,
data
,
schema
).
prefixWith
(
key
,
null
);
}
}
if
(
schema
.
properties
!==
undefined
&&
schema
.
properties
[
key
]
!==
undefined
)
{
foundMatch
=
true
;
if
(
error
=
this
.
validateAll
(
data
[
key
],
schema
.
properties
[
key
],
[
key
],
[
"
properties
"
,
key
],
keyPointerPath
))
{
...
...
@@ -1447,6 +1452,7 @@ var ErrorCodes = {
OBJECT_REQUIRED
:
302
,
OBJECT_ADDITIONAL_PROPERTIES
:
303
,
OBJECT_DEPENDENCY_KEY
:
304
,
OBJECT_PROPERTY_NAMES
:
305
,
// Array errors
ARRAY_LENGTH_SHORT
:
400
,
ARRAY_LENGTH_LONG
:
401
,
...
...
@@ -1491,6 +1497,7 @@ var ErrorMessagesDefault = {
OBJECT_REQUIRED
:
"
Missing required property: {key}
"
,
OBJECT_ADDITIONAL_PROPERTIES
:
"
Additional properties not allowed
"
,
OBJECT_DEPENDENCY_KEY
:
"
Dependency failed - key must exist: {missing} (due to key: {key})
"
,
OBJECT_PROPERTY_NAMES
:
"
Property name
\"
{key}
\"
does not match schema with error: {error}
"
,
// Array errors
ARRAY_LENGTH_SHORT
:
"
Array is too short ({length}), minimum {minimum}
"
,
ARRAY_LENGTH_LONG
:
"
Array is too long ({length}), maximum {maximum}
"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment