Skip to content

setLocale not working #11

@Reocin

Description

@Reocin

Hey,

First, thanks for your really useful library!

Is it possible for to connect your phone function with the setLocale function from yup ?

With the set Locale function, i can change all the different languages on one place. But your phone function isn't working.

The native yup functions predefine the error message from the locale definition like:

length( length: number | Reference<number>, message: Message<{ length: number }> = locale.length, ) { .... }
source: https://github.com/jquense/yup/blob/master/src/string.ts

In your case, it is a hard coded string in English (or you change it explicitly when you call the phone function).

regards
Reocin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions