Skip to content
New issue

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

April32024 #34

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

April32024 #34

wants to merge 4 commits into from

Conversation

takkeeq
Copy link

@takkeeq takkeeq commented Apr 3, 2024

No description provided.

Copy link
Author

@takkeeq takkeeq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

first pull request comment

@rakesh410
Copy link

I don't think this code should be merged to main branch as it does not work properly, neither it contains any documentation about what it does.

e.g.:

import React from "react";
import { Formik, Form, Field , ErrorMessage} from "formik";
import * as yup from 'yup';

const LoginForm = () => {
    const validationSchema = yup.object({
        username: yup.string().required('Username cannot be empty.'),
        password: yup.string().required('Password cannot be empty.')
    })

    const onSubmit = async (values) => {
        console.log(values);
    }

    return (
        <Formik initialValues={{username: '', password: ''}} validationSchema={validationSchema} onSubmit={onSubmit}>
            <Form>
                <label htmlFor='Username'>
 ``               Email
                </label>
                <Field id='username' name='username' />
                <ErrorMessage component='a' name='username' />
                <label htmlFor='Password'>
``                Password
                </label>
                <Field id='password' name='password' />
                <ErrorMessage component='a' name='password' />
                <div className='mt-8'>
                    <button type='submit'>
                        Login
                    </button>
                </div>
            </Form>
        </Formik>
    )
}

export default LoginForm;

Above code does not even work, it should be given proper format and should redirect to dashboard if its just a placeholder page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants