8000 Custom validator's message not showing · Issue #602 · json-schema-form/angular-schema-form · GitHub
[go: up one dir, main page]

Skip to content
Custom validator's message not showing #602
Closed
@kazoompa

Description

@kazoompa

I have already read this issue: #369 but my problem is quite different.

I have added a a custom validator and message to one of my form fields:

 'staff[].title': {
   key: 'staff[].title',
   validationMessage: {
     'needTitle': function() { console.log('DEBUG!'); return 'Need title';}
   },
   $validators: {
     needTitle: function (value) {
       return value ? true : false;
     }
   }
 }

When I call $scope.$broadcast('schemaFormValidate'); all empty required fields including staff[].title indicate that there is an error. However, the field staff[].title does not show any error message. The only way the staff[].title's error message is show is when I type a character in that field then delete it.

Am I doing something wrong?

I am using the latest version of angular-schema-form (0.8.12).

Thanks for your help.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0