Skip to content

create user form not working #14

@cyclops24

Description

@cyclops24

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

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