Merge pull request #1062 from Safelite/defect/CSR-1330

Changed the unique identifier for the validation field to use groupNa…
This commit is contained in:
Leah Schumann 2023-04-14 13:49:52 -04:00 committed by GitHub
commit 05c2c6a1a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -131,10 +131,6 @@ export default {
customButtonQuestionId: String,
},
setup(props) {
const buttonQuestionId = !props.customButtonQuestionId
? `button-question-${crypto.randomUUID()}`
: props.customButtonQuestionId;
const propsClone = Object.assign({}, props);
const modelValue = propsClone.modelValue;
@ -144,10 +140,9 @@ export default {
};
const { errorMessage, handleBlur, handleChange, meta, validate, errors, resetField } =
useField(buttonQuestionId, props.validationRules, fieldOptions);
useField(props.groupName, props.validationRules, fieldOptions);
return {
buttonQuestionId,
errorMessage,
handleBlur,
handleChange,