Skip to content

Commit a37c07e

Browse files
committed
Remove pointers in schema. Fixes #17
1 parent 1e9e292 commit a37c07e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ function download () {
4040

4141
$('#form').alpaca({
4242
// Schema from schema/index.js
43-
schema,
43+
// Stringify and parse to remove all pointer-like objects that could break
44+
// things such as validation error messages.
45+
schema: JSON.parse(JSON.stringify(schema)),
4446
options: {
4547
// Field extra data from schema/options.js
4648
fields,

0 commit comments

Comments
 (0)