for problem number 1. make sure there isnt a newline at the end of the text box. this would cause the other space.
your second problem is because of the regular expression. \S means any non-whitespace character and its only looking to match one instance at the beginning of the string. You also cant use && the way you did there. you would need to do the regex twice or apply it to both strings in the same if.
if (preg_match("/^(\s*)$/", $_POST['Text'])){
//is proper, or
if (preg_match("/^(\s*)$/", $_POST['Text']) || preg_match("/^(\s*)$/", $_POST['Name'])) {