Can update device general information
This commit is contained in:
		
							
								
								
									
										8
									
								
								central_frontend/src/utils/StringsUtils.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								central_frontend/src/utils/StringsUtils.ts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
			
		||||
import { LenConstraint } from "../api/ServerApi";
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Check whether a string length is valid or not
 | 
			
		||||
 */
 | 
			
		||||
export function lenValid(s: string, c: LenConstraint): boolean {
 | 
			
		||||
  return s.length >= c.min && s.length <= c.max;
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user