An angular directive that automatically adjusts input values based on dynamic values of its maxlength, max and min attributes