This repository was archived by the owner on Jun 14, 2024. It is now read-only.

Description
I saw in a commit that doing a 12 words validation was commented as a TODO. In AuBit I did like this:
const validationSchema = Yup.object().shape({
mnemonic: Yup.string()
.test('mnemonic', function(value) {
let errorMessage
if (value)) {
if (value.split(' ').length !== 12) {
errorMessage = 'Mnemonic should have 12 words'
}
} else {
errorMessage = 'This field is required'
}
return this.createError({ path: this.path, message: errorMessage })
})
})
Just an idea! you might want to go from here.