We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In spanish, the string for mixed.notType is a little odd
mixed.notType
[field] debe ser un "number" Tipo, Pero el valor final fue: NaN (Eche el valor "".)
To replace just one rule, I imported the es locale, de-estructured it, modified it and exported it again
es
// custom-es-locale.js import * as yupLocales from 'yup-locales'; const {array, boolean, date, mixed, number, object, string} = yupLocales.es const new_mixed = Object.assign({}, mixed, { notType: ({path}) => { return `${path} no es válido` } }) export default { array, boolean, date, mixed: new_mixed, number, object, string }
Then proceed as the example
// your-main.js import { custom_es } from './custom-es-locale.js'; import { setLocale } from 'yup'; setLocale( custom_es );
Is there a better way?
The text was updated successfully, but these errors were encountered:
I don't see any other way right now...
Maybe shortening custom-es-locale.js:
custom-es-locale.js
// custom-es-locale.js import { es } from 'yup-locales'; es.mixed.notType = ({path}) => `${path} no es válido` export default es
Sorry, something went wrong.
No branches or pull requests
In spanish, the string for
mixed.notType
is a little oddTo replace just one rule, I imported the
es
locale, de-estructured it, modified it and exported it againThen proceed as the example
Is there a better way?
The text was updated successfully, but these errors were encountered: