Skip to content

val is not defined #124

Closed
Closed
@sukhminderx

Description

@sukhminderx

I am using this amazing component in my application with TypeScript.
I applied required validator and it gives me this error as the component loads:


simple-react-validator.min.js:108 Uncaught ReferenceError: val is not defined
    at Object.isBlank (simple-react-validator.min.js:108)

On debugging, I found that this comes at this code segment:

    ``` isBlank: function (e) {
      return null == e || this.testRegex(val, /^[\s]*$/);
    }, ```

I searched for the variable val in the code but could not find it. it is undefined and causes this error. I guess it should be e rather than val as in all other methods such as:

          return e === Object(e) && Object.keys(e).length ? Object.keys(e)[0] : e.split(":")[0];
        },```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions