module.exports = class AcceptanceValidator
	@detectBy: ['acceptance']
	
	constructor: (@params) ->
	
	validate: (value, valid) ->
		acceptedValue = @params.acceptance.accept or '1'
		
		valid (value and value.toString() is acceptedValue.toString()), 'should be accepted'