module.exports = class PresenceValidator
	@detectBy: ['presence']
	
	constructor: (@params) ->
	
	validate: (value, valid) ->
		return valid(yes) if not @params.presence
		
		if not value and not @params.allowBlank
			valid no, 'is not present'
		else valid yes