| Yoshie Muranaka | 4b0fc1d | 2020-01-06 07:36:16 -0800 | [diff] [blame] | 1 | const VuelidateMixin = { |
| 2 | methods: { |
| 3 | getValidationState(model) { |
| jason westover | d36ac8a | 2025-11-03 20:58:59 -0600 | [diff] [blame^] | 4 | if (!model) return null; |
| Yoshie Muranaka | 4b0fc1d | 2020-01-06 07:36:16 -0800 | [diff] [blame] | 5 | const { $dirty, $error } = model; |
| 6 | return $dirty ? !$error : null; |
| Derick Montague | 602e98a | 2020-10-21 16:20:00 -0500 | [diff] [blame] | 7 | }, |
| 8 | }, |
| Yoshie Muranaka | 4b0fc1d | 2020-01-06 07:36:16 -0800 | [diff] [blame] | 9 | }; |
| 10 | |
| 11 | export default VuelidateMixin; |