Implemented validation support for $key=>$value pairs

Implemented support for input paramaters in the form of $key=>$value,
instead of supporting $value only.