-
-
Save wilcorrea/fbb148b2074f6a0492f1a12bb3dc1fa5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Model from './Model'; | |
| import Genero from './Genero' | |
| import Escolaridade from './Escolaridade'; | |
| import { required } from 'vuelidate/lib/validators'; | |
| import { validarCpf } from '../services/Utils'; | |
| class Candidato extends Model { | |
| constructor() { | |
| super(); | |
| this.cpf = undefined; | |
| this.nome = undefined; | |
| this.dtCadastro = new Date(); | |
| this.dtNascimento = undefined; | |
| this.genero = new Genero(); | |
| this.fone = undefined; | |
| this.escolaridade = new Escolaridade(); | |
| this.estudante = false; | |
| this.turno = undefined; | |
| this.cnh = false; | |
| this.cnhCategoria = undefined; | |
| this.veiculo = false; | |
| this.veiculoTipo = undefined; | |
| this.informatica = false; | |
| this.cursos = []; | |
| } | |
| } | |
| const CandidatoValidation = { | |
| cpf: { | |
| required, | |
| cpfValido(value) { | |
| return validarCpf(value) | |
| } | |
| }, | |
| nome: { | |
| required | |
| }, | |
| dtCadastro: { | |
| required | |
| }, | |
| dtNascimento: { | |
| required | |
| }, | |
| genero: { | |
| id: { | |
| required(value) { | |
| return value === 0 ? false : true; | |
| } | |
| } | |
| }, | |
| fone: { | |
| required | |
| }, | |
| escolaridade: { | |
| id: { | |
| required(value) { | |
| return value === 0 ? false : true; | |
| } | |
| } | |
| }, | |
| } | |
| export { Candidato, CandidatoValidation } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment