fixed and refactoring

fix for ajax validations wihtout parameter

create logig refactoring