can be done on submission in controller, or using javascript/ajax while user is still filling the data. Second option is better.