Add support for setting up custom rules on the fly .
using form.getField('key').setRules(new rules here)
add a new rule same to match field value with other field value
i.e can be used in confirm password case
const field: IFieldObject = {
password: {
label: 'Password',
value: '123',
rules: {
min: 5,
max: 10,
},
},
confirmPassword: {
label: 'Confirm Password',
value: '123',
rules: {
same: 'password',
min: 5,
max: 10,
},
},
};