String validation and sanitization for Dart.