src/Services/Validator.php
protected function validateAccepted( $value )
	{
		$acceptable = ['yes', 'on', '1', 1, true, 'true'];

		return $this->validateRequired( $value ) && in_array( $value, $acceptable, true );
	}
protected function validateAccepted( $value )
	{
		$acceptable = ['yes', 'on', '1', 1, true, 'true'];

		return $this->validateRequired( $value ) && in_array( $value, $acceptable, true );
	}
protected function validateAccepted ( $ value ) { $ acceptable = [ 'yes' , 'on' , '1' , 1 , true , 'true' ] ; return $ this -> validateRequired ( $ value ) && in_array ( $ value , $ acceptable , true ) ; }
Validate that an attribute was "accepted".

This validation rule implies the attribute is "required".

@param mixed  $value

@return bool
Validate that an attribute was accepted .