Inputfields whitespace validation

#1851, and sorry