Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fix validator example

...

Code Block
languagexml
<FormText :validations="v => [v.required(), customValidator(), customValidate]">
<FormText :validate="customValidate" />

<script>
export default {
  methods: {
    customValidator() {
      return {
        validate: val => val =!= 'no',
        message: () => 'value must not be "no"',
      };
    },
    customValidate(val) {
      if (val == 'false') return 'value must not be "false"';
    }
  }
};
</script>

...