19 lines
		
	
	
		
			226 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
		
		
			
		
	
	
			19 lines
		
	
	
		
			226 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
|  | require_relative "base" | ||
|  | 
 | ||
|  | module Validators | ||
|  |   module FieldValidator | ||
|  |     class NotEmpty < Base | ||
|  | 
 | ||
|  |       def valid? | ||
|  |         !@value.empty? | ||
|  |       end | ||
|  | 
 | ||
|  |       def message | ||
|  |         "Value can not be empty" | ||
|  |       end | ||
|  | 
 | ||
|  |     end | ||
|  |   end | ||
|  | end | ||
|  | 
 |