made new function in validation.py get_param()

cleaned code with new function