fixed js validation, flash message