Skip to content

Validation Messages showing on Initial Load #241

@jatindua81

Description

@jatindua81

Hi There

We are currently working on a razor application using knockout 2.1. We have started using the knockout validation library.

The issue is that we have a view with an Add button. Clicking the Add button results in a popup with a couple of Select and date picker controls. Problem is that the ko validations are being fired on the initial load of the popup. What are we missing here - maybe on the initial load of the view, knockout thinks the view model has changed and therefore fires the validations? How can we determine which property on the view model has changed and is there a way to stop that explicitly?

We are trying "this.<>.isModified(false)" but no luck. This isnt working too:
ko.validation.configure({
registerExtenders: true,
messagesOnModified: true,
insertMessages: false,
parseInputAttributes: true,
messageTemplate: null,
grouping: {
deep: true
}
});

Any help will be appreciated guys

Thanks

Jatin

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