How to use the crizmas-form.validation.required 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 / editor / editor-controller.js View on Github external
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
          }
github gothinkster / crizmas-mvc-realworld-example-app / src / js / pages / login / login-controller.js View on Github external
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;
      }
github gothinkster / crizmas-mvc-realworld-example-app / src / js / pages / settings / settings-controller.js View on Github external
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;
      }
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;
      }

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