Implemented associative arrays validation

here is patch for v3
i couldn't test it unfortunately, since v3 breaks my script, but it worked on master, and i don't see much difference