checking content of error
added server side validation

Added server side validation that works with JS disabled. Code still ugly, but it works