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: 'title',
initialValue: ctrl.article && ctrl.article.title,
validate: validation.required()
},
{
name: 'description',
initialValue: ctrl.article && ctrl.article.description
},
{
name: 'body',
initialValue: ctrl.article && ctrl.article.body,
validate: validation.required()
},
{
name: 'tagString',
actions: {
submit: ctrl.updateTagList
}
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: 'email',
validate: validation.required()
},
{
name: 'password',
validate: validation.required()
}
],
actions: {
submit: () => {
ctrl.login(ctrl.form.getResult());
}
},
onFormChange: () => {
ctrl.serverErrors = null;
}
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()
}
],
actions: {
submit: () => {
ctrl.update(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());
}
},
onFormChange: () => {
ctrl.serverErrors = null;
}
const init = () => {
ctrl.form = new Form({
children: [
{
name: 'email',
validate: validation.required()
},
{
name: 'password',
validate: validation.required()
}
],
actions: {
submit: () => {
ctrl.login(ctrl.form.getResult());
}
},
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: {
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',
const init = () => {
ctrl.form = new Form({
actions: {
submit: () => {
ctrl.postComment(ctrl.form.getResult());
}
}
});
};