Browse Source

Fixing phone number DDD to 2 numbers

master
GabrielTrettel 3 years ago
parent
commit
c80fdd77a5
  1. 2
      src/app/screens/LoginScreen.js
  2. 4
      src/app/screens/RegisterScreen.js

2
src/app/screens/LoginScreen.js

@ -141,7 +141,7 @@ export default function LoginScreen(props) {
maxLength={12}
name="name"
keyboardType="numeric"
placeholder="Número de telefone celular"
placeholder="(DD) XXXXX-XXXX"
/>
</View>

4
src/app/screens/RegisterScreen.js

@ -41,7 +41,7 @@ import CheckBox from "../components/forms/CheckBox";
import defaultStyles from "../config/styles"
const phoneRegex = RegExp(
/^\(?[\(]?([0-9]{2,3})?\)?[)\b]?([0-9]{4,5})[-. ]?([0-9]{4})$/
/^\(?[\(]?([0-9]{2})?\)?[)\b]?([0-9]{4,5})[-. ]?([0-9]{4})$/
);
const validationSchema = Yup.object().shape({
@ -444,7 +444,7 @@ export default function RegisterScreen(props) {
flex={1}
maxLength={12}
name="number"
placeholder="(DDD) XXXXX-XXXX"
placeholder="(DD) XXXXX-XXXX"
paddingRight={2}
/>
</View>

Loading…
Cancel
Save