Skip to content

CheckValid not working as expected #286

@codeuniquely

Description

@codeuniquely

when i call to check valid

this.checkValid = function(form) {
   return !!(form && form.$valid);
};

Here . form.$valid = undefined

This is because i have an OPTIONAL control (user does not have to fill it in), but if they do it has a regEx validation.

so this input on the form also has a $valid = undefined - because the user NEVER entered the input and just skipped that part of the form.

The control is still ng-valid, the form is ng-valid (all inputs) - and none of the error messages show.

but checkValid returns FALSE - so the form does not submit

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