@shopgate/engage
Version:
Shopgate's ENGAGE library.
25 lines • 540 B
JavaScript
import { generateFormConstraints } from '@shopgate/engage/account/helper/form';
export default customerAttributes => ({
firstName: {
presence: {
message: 'validation.required',
allowEmpty: false
}
},
lastName: {
presence: {
message: 'validation.required',
allowEmpty: false
}
},
emailAddress: {
presence: {
message: 'validation.required',
allowEmpty: false
},
email: {
message: 'validation.email'
}
},
...generateFormConstraints(customerAttributes)
});