Skip to content

Commit 3dd7680

Browse files
authored
Merge pull request #370 from gezichenshan/unscape-html-for-error-msg
Unscaped html for error msg
2 parents 56c075f + 026439a commit 3dd7680

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

dist/vfg-core.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vfg.js

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/fields/core/fieldInput.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export default {
9393
onInput($event) {
9494
let value = $event.target.value;
9595
switch(this.schema.inputType.toLowerCase()) {
96-
case "number":
96+
case "number":
9797
case "range":
9898
if($event.target.valueAsNumber) {
9999
value = $event.target.valueAsNumber;
@@ -138,7 +138,7 @@ export default {
138138
139139
created () {
140140
if(this.schema.inputType.toLowerCase() == "file") {
141-
console.warn("The 'file' type in input field is deprecated. Use 'file' field instead.");
141+
console.warn("The 'file' type in input field is deprecated. Use 'file' field instead.");
142142
}
143143
}
144144
};

src/formGenerator.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ div.vue-form-generator(v-if='schema != null')
1414
button(v-for='btn in field.buttons', @click='buttonClickHandler(btn, field, $event)', :class='btn.classes') {{ btn.label }}
1515
.hint(v-if='field.hint') {{ fieldHint(field) }}
1616
.errors.help-block(v-if='fieldErrors(field).length > 0')
17-
span(v-for='(error, index) in fieldErrors(field)', track-by='index') {{ error }}
17+
span(v-for='(error, index) in fieldErrors(field)', v-html='error', track-by='index')
1818

1919
template(v-for='group in groups')
2020
fieldset(:is='tag', :class='getFieldRowClasses(group)')
@@ -32,7 +32,7 @@ div.vue-form-generator(v-if='schema != null')
3232
button(v-for='btn in field.buttons', @click='buttonClickHandler(btn, field, $event)', :class='btn.classes') {{ btn.label }}
3333
.hint(v-if='field.hint') {{ field.hint }}
3434
.errors.help-block(v-if='fieldErrors(field).length > 0')
35-
span(v-for='(error, index) in fieldErrors(field)', track-by='index') {{ error }}
35+
span(v-for='(error, index) in fieldErrors(field)', v-html='error', track-by='index')
3636
</template>
3737

3838
<script>
@@ -280,7 +280,7 @@ div.vue-form-generator(v-if='schema != null')
280280
281281
return field.featured;
282282
},
283-
283+
284284
// Get current hint.
285285
fieldHint(field){
286286
if (isFunction(field.hint))
@@ -379,7 +379,7 @@ div.vue-form-generator(v-if='schema != null')
379379
getFieldID(schema) {
380380
const idPrefix = this.options && this.options.fieldIdPrefix ? this.options.fieldIdPrefix : "";
381381
return slugifyFormID(schema, idPrefix);
382-
}
382+
}
383383
}
384384
};
385385

0 commit comments

Comments
 (0)