Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const init = () => {
ctrl.form = new Form({
children: [
{
name: 'image',
initialValue: currentUser.image
},
{
name: 'username',
initialValue: currentUser.username,
validate: validation(validation.required(), getUsernameValidator())
},
{
name: 'bio',
initialValue: currentUser.bio
},
{
name: 'email',
initialValue: currentUser.email,
validate: validation.required()
},
{
name: 'password',
validate: getPasswordValidator()
}
],
const init = () => {
ctrl.form = new Form({
children: [
{
name: 'username',
validate: validation(validation.required(), getUsernameValidator())
},
{
name: 'email',
validate: validation.required()
},
{
name: 'password',
validate: validation(validation.required(), getPasswordValidator())
}
],
actions: {
submit: () => {
ctrl.register(ctrl.form.getResult());
}
},
onFormChange: () => {
ctrl.serverErrors = null;
}
});
};
const init = () => {
ctrl.form = new Form({
children: [
{
name: 'username',
validate: validation(validation.required(), getUsernameValidator())
},
{
name: 'email',
validate: validation.required()
},
{
name: 'password',
validate: validation(validation.required(), getPasswordValidator())
}
],
actions: {
submit: () => {
ctrl.register(ctrl.form.getResult());
}
},