Fixed hasRule() method.

I had some problems with the addition of an array of the rules via `rules()` method.
Rules didn't work if the value was empty.
Although, if add rules one by one, everything work as it should.
This PR solves this problem.