lera.cernolev
5/9/2019 - 6:43 PM

Radio Button Validation

<!-- Javascript -> Head -->
<script>
var question = 'Have you had a revision surgery? ';
var errorMessage = 'We\'re Only Accepting Revision Surgery';
window.__custom_form_validations = [
  {
    fieldName: question,
    validationFn: function (input) {
      return {
        isValid: input[0].checked,
        message: window._Translate.get(errorMessage),
      };
    },
  },
];
</script>