Skip to content

Commit

Permalink
refactor: reorganizar componentes de edição de perfil e atualizar val…
Browse files Browse the repository at this point in the history
…idação de telefone.
  • Loading branch information
oalissonbatista committed Jan 14, 2025
1 parent 258947b commit f2b2570
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_API_BASE_URL=http://localhost:3000
10 changes: 5 additions & 5 deletions src/pages/ProfileEdit/ProfileEditForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ function SignUpForm() {
</Field>
<Field invalid={!!errors.phone} errorText={errors.phone?.message}>
<Input
size={'2xl'}
placeholder={'Telefone'}
size="2xl"
placeholder="Telefone"
{...register('phone', {
required: "Campo obrigatório.",
required: 'Campo obrigatório.',
pattern: {
value: /^\d{11}$/,
message: "Telefone inválido."
value: /^\(?\d{2}\)?\s?\d{4,5}-?\d{4}$/,
message: 'Telefone inválido. Formato esperado (99) 99999-9999.'
}
})}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ProfileEdit/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box, Center, Stack } from '@chakra-ui/react';
import ProfileEditForm from './ProfileEditForm';
import ProfileEditHeader from './ProfileEditHeader';
import ProfileEditHeader from '../NotFound/ProfileEditHeader';

function ProfileEdit() {
return (
Expand Down

0 comments on commit f2b2570

Please sign in to comment.