mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-04 12:14:11 +00:00 
			
		
		
		
	Display basic login form
This commit is contained in:
		
							
								
								
									
										13
									
								
								lib/utils/input_utils.dart
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								lib/utils/input_utils.dart
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
			
		||||
/// Input utilities
 | 
			
		||||
///
 | 
			
		||||
/// @author Pierre HUBERT
 | 
			
		||||
 | 
			
		||||
/// Check out whether a given email address is valid or not
 | 
			
		||||
///
 | 
			
		||||
/// Taken from https://medium.com/@nitishk72/form-validation-in-flutter-d762fbc9212c
 | 
			
		||||
bool validateEmail(String value) {
 | 
			
		||||
  Pattern pattern =
 | 
			
		||||
      r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$';
 | 
			
		||||
  RegExp regex = new RegExp(pattern);
 | 
			
		||||
  return regex.hasMatch(value);
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										11
									
								
								lib/utils/intl_utils.dart
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								lib/utils/intl_utils.dart
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
/// Internationalization utilities
 | 
			
		||||
///
 | 
			
		||||
/// @author Pierre HUBERT
 | 
			
		||||
 | 
			
		||||
/// Translate a string
 | 
			
		||||
///
 | 
			
		||||
/// Translate a given [string] into the current language, if available
 | 
			
		||||
String tr(String string) {
 | 
			
		||||
  //TODO : create translation system
 | 
			
		||||
  return string;
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user