import { required, requiredIf, numeric } from "vuelidate/lib/validators";
import addressFormHandler from '../addressFormHandler'
export default {
    validations: {
        parameters: {
            reference: {
                required: requiredIf(function(){
                    return ![7,8].includes(this.$store.getters.getCompanyModuleType);
                })
            },
            street_one: { required },
            street_two: {
                required: requiredIf(function(){
                    return [7,8].includes(this.$store.getters.getCompanyModuleType);
                })
            },
            district_id: { required },
            post_code: { required },
            remark: {},
            phone: {required, numeric},
            person_in_charge: { required },
        }
    },
    mixins: [addressFormHandler]
}