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

create user form not working #14

Open
cyclops24 opened this issue Feb 21, 2018 · 0 comments
Open

create user form not working #14

cyclops24 opened this issue Feb 21, 2018 · 0 comments

Comments

@cyclops24
Copy link

cyclops24 commented Feb 21, 2018

Hi @kimkha, I create a simple create form for my users and it's worked well but when I try to add a repeatPassword field it's not working with this error on browser console:

Unprocessable Entity
Warning: Missing translation for key: "Unprocessable Entity"

This is my form code:

const passwordsMatch = ({ password, confirmPassword }) => {
       return password === confirmPassword;
};

export const EmployeeCreate = (props) => (
    <Create {...props}>
        <SimpleForm validate={passwordsMatch}>
            <TextInput source="username" validate={ required }/>
            <TextInput source="email" type="email" validate={ required }/>
            <TextInput source="name" validate={ required }/>
            <TextInput source="family" validate={ required }/>
            <TextInput source="password" type="password" validate={ required }/>
            <TextInput source="repeatPassword" type="password" validate={ required }/>
        </SimpleForm>
    </Create>
);

Are you any suggestion to fix it?
SO question: https://stackoverflow.com/questions/48898743/prevent-field-to-send-in-request

@cyclops24 cyclops24 changed the title edit user form not working and closed with error edit user form not working Feb 21, 2018
@cyclops24 cyclops24 changed the title edit user form not working create user form not working Feb 21, 2018
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

No branches or pull requests

1 participant