Returns true if the value is present in the list. Otherwise return false.
The list is returned via Options property that can be parametrize by the name of the list with ParamId parameter.
@property Options
Promise that returns list of param items (key-value pairs)
@property ParamId - The name of the list to be returned.
@example
//when
var validator = new paramValidator();
validator.Options = optionsFce;
validator.ParamId = "jobs";
//excercise
var promiseResult = validator.isAcceptable("programmer");
it('value from list should return true', function (done) {
promiseResult.then(function(result) {
//verify
expect(result).to.equal(true);
done();
}).done(null, done);
});
//excercise
var promiseResult2 = validator.isAcceptable("non existing item");
it('value out of list should return false', function (done) {
promiseResult2.then(function(result) {
//verify
expect(result).to.equal(false);
done();
}).done(null, done);
});
object
ParamValidator
Q
Returns true if the value is present in the list. Otherwise return false. The list is returned via Options property that can be parametrize by the name of the list with ParamId parameter.
@property Options Promise that returns list of param items (key-value pairs)
@property ParamId - The name of the list to be returned.
@example