import { required, email, numeric, sameAs, requiredUnless, requiredIf } from "vuelidate/lib/validators";
import authenticationHandler from '../authenticationHandler'
export default {
    validations: {
        parameters: {
            name: {
                required
            },
            email: {
                required: requiredIf(function () { return this.step === 2 }),
                email
            },
            company_name: {
                required: requiredIf(function () { return this.parameters.type === 1 })
            },
            phone: {
                required,
                numeric
            },
            password: {
                required: requiredIf(function () { return this.step === 2 }),
            },
            password_confirmation: {
                required: requiredIf(function () { return this.step === 2 }),
                sameAs: sameAs('password')
            }
        }
    },
    mixins: [authenticationHandler]
}