js functions to validate register and auth form (some validators in core class (like validateEmail))