moved if_ and error_ functionality to validator level instead of mixin level.