Skip to content

Custom Callback not working #14

Open
@evanpratama

Description

@evanpratama

Hi,

I tried using your directive, but can't seem to get the Custom call back working:

HTML:

<input type="email" name="email" ng-model="user.email" ng-remote-validate="{ '/user/checkEmailValid' : 'uniqueEmail'}" />

Controller:

var registrationApp = angular.module('registrationApp',['ui.utils','remoteValidation']);
registrationApp.controller('RegistrationCtrl', function ($scope, $http, $window) {
    $scope.emailSetArgs = function( val, el, attrs, ngModel ) {
        return { test: val };
    };
});

It is always sent as { value: val } instead of { test: val }. I was thinking of sending the string straightaway without any JSON array.

Am I doing anything wrong in my code?

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