Skip to content

Need help with .validate() #7

Description

@sjonesyodle

Need help with this validator function..

//Invoke validations and wait for the validations to fulfill
u1.validate(function() {
  if u1.isValid {
     //validated, perform business logic
  } else {
     //validation failed, dump validation errors to the console
     console.log(p1.errors)
  }
});

A few things.

  • Some errors in this example. It should look like..
//Invoke validations and wait for the validations to fulfill
u1.validate(function() {
  if ( u1.isValid ) {
     //validated, perform business logic
  } else {
     //validation failed, dump validation errors to the console
     console.log(u1.errors)
  }
});

".validate" takes an argument as "filter" but does nothing with it nor invokes it as the example above illustrates.

The function does this with it..

if (filter) {
        vProps = [filter];
      }

Am I missing something?

Best,
Steve

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions