Add length check for Day 4, hcl value
This commit is contained in:
		
							parent
							
								
									0ffbddb7db
								
							
						
					
					
						commit
						561a1453df
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		|  | @ -76,6 +76,9 @@ impl Creds { | |||
|     } | ||||
| 
 | ||||
|     fn validate_hcl(val: &str) -> bool { | ||||
|         if val.len() != 7 { | ||||
|             return false; | ||||
|         } | ||||
|         let mut ch = val.chars(); | ||||
|         if ch.next() != Some('#') { | ||||
|             return false; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue