Rigirous form validation on Port Tab.

Signed-off-by: Min Chen <minchnew@gmail.com>
Minor bug fix.

Signed-off-by: Min Chen <minchnew@gmail.com>