1elements: {
2 $each: {
3 type: {
4 required,
5 },
6 question: {
7 required: requiredIf(prop => prop.type === 'input'),
8 }
9 }
10 }
1validations: {
2 form: {
3 old_password: {
4 data: { required },
5 },
6 new_password: {
7 data: { required },
8 },
9 repeat_password: {
10 data: {
11 sameAsPassword: sameAs(function() {
12 return this.form.new_password.data;
13 })
14 },
15 },
16 },
17 },