How to use the crizmas-form.validation function in crizmas-form

To help you get started, we’ve selected a few crizmas-form examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gothinkster / crizmas-mvc-realworld-example-app / src / js / pages / settings / settings-controller.js View on Github external
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()
        }
      ],
github gothinkster / crizmas-mvc-realworld-example-app / src / js / pages / register / register-controller.js View on Github external
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;
      }
    });
  };
github gothinkster / crizmas-mvc-realworld-example-app / src / js / pages / register / register-controller.js View on Github external
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());
        }
      },

crizmas-form

Form tools used in conjunction with the crizmas-mvc framework.

MIT
Latest version published 3 years ago

Package Health Score

42 / 100
Full package analysis