opnform/client/mixins/forms/fieldsLogic.js

18 lines
418 B
JavaScript
Raw Normal View History

2023-12-09 14:47:03 +00:00
import FormPropertyLogicRule from '../../forms/FormPropertyLogicRule.js'
export default {
methods: {
validateFieldsLogic (properties) {
properties.forEach((field) => {
const isValid = (new FormPropertyLogicRule(field)).isValid()
if(!isValid){
field.logic = {
conditions: null,
actions: []
}
}
})
return properties
}
}
}