aor-loopback icon indicating copy to clipboard operation
aor-loopback copied to clipboard

create user form not working

Open cyclops24 opened this issue 7 years ago • 0 comments

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 avatar Feb 21 '18 05:02 cyclops24