Add required for secret or password field.

@param  \Illuminate\Contracts\Validation\Validator  $resolver
@param  string  $field
@param  string  $hidden

@return void
189148
protected function addRequiredForSecretField(ValidatorResolver $resolver, $field, $hidden)
    {
        $resolver->sometimes($field, 'required', function ($input) use ($hidden) {
            return $input->$hidden == 'yes';
        });
    }
1064774
public function removeHidden($hidden)
	{
		if (is_string($hidden)) {
			$hidden = func_get_args();
		}

		$this->hidden = array_diff($this->hidden, $hidden);

		return $this;
	}
293612
protected function configureResolver(OptionsResolver $resolver)
    {
        $resolver
            ->setRequired(['_id', '_type', '_source'])
            ->setDefaults(['_score' => null, 'fields' => []])
            ->addAllowedTypes('_id', ['integer', 'string'])
            ->addAllowedTypes('_type', 'string')
            ->addAllowedTypes('_source', 'array')
            ->addAllowedTypes('fields', 'array');
    }
1326337
private function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setDefaults([
            'cache_lifetime' => 86400 * 30, // 30 days
            'default_ttl' => 0,
            //Deprecated as of v1.3, to be removed in v2.0. Use respect_response_cache_directives instead
            'respect_cache_headers' => null,
            'hash_algo' => 'sha1',
            'methods' => ['GET', 'HEAD'],
            'respect_response_cache_directives' => ['no-cache', 'private', 'max-age', 'no-store'],
            'cache_key_generator' => null,
            'cache_listeners' => [],
        ]);

        $resolver->setAllowedTypes('cache_lifetime', ['int', 'null']);
        $resolver->setAllowedTypes('default_ttl', ['int', 'null']);
        $resolver->setAllowedTypes('respect_cache_headers', ['bool', 'null']);
        $resolver->setAllowedTypes('methods', 'array');
        $resolver->setAllowedTypes('cache_key_generator', ['null', 'Http\Client\Common\Plugin\Cache\Generator\CacheKeyGenerator']);
        $resolver->setAllowedValues('hash_algo', hash_algos());
        $resolver->setAllowedValues('methods', function ($value) {
            /* RFC7230 sections 3.1.1 and 3.2.6 except limited to uppercase characters. */
            $matches = preg_grep('/[^A-Z0-9!#$%&\'*+\-.^_`|~]/', $value);

            return empty($matches);
        });
        $resolver->setAllowedTypes('cache_listeners', ['array']);

        $resolver->setNormalizer('respect_cache_headers', function (Options $options, $value) {
            if (null !== $value) {
                @trigger_error('The option "respect_cache_headers" is deprecated since version 1.3 and will be removed in 2.0. Use "respect_response_cache_directives" instead.', E_USER_DEPRECATED);
            }

            return null === $value ? true : $value;
        });

        $resolver->setNormalizer('respect_response_cache_directives', function (Options $options, $value) {
            if (false === $options['respect_cache_headers']) {
                return [];
            }

            return $value;
        });
    }
783073
private function buildIgnoreHidden(SimpleXMLElement $phpDocumentor): bool
    {
        if ((array) $phpDocumentor->files === []) {
            return $this->ignoreHidden;
        }

        if ((string) $phpDocumentor->files->{'ignore-hidden'} === '') {
            return $this->ignoreHidden;
        }

        return filter_var($phpDocumentor->files->{'ignore-hidden'}, FILTER_VALIDATE_BOOLEAN);
    }
648482
public function setHidden($hidden) {
        if ($this->autocompleterValues) {
            throw new \LogicException('A hidden question cannot use the autocompleter.');
        }

        $this->hidden = (bool)$hidden;

        return $this;
    }
1361092
protected function add_hidden_fields() {
        $mform = $this->_form;

        $mform->addElement('hidden', 'id');
        $mform->setType('id', PARAM_INT);

        $mform->addElement('hidden', 'inpopup');
        $mform->setType('inpopup', PARAM_INT);

        $mform->addElement('hidden', 'cmid');
        $mform->setType('cmid', PARAM_INT);

        $mform->addElement('hidden', 'courseid');
        $mform->setType('courseid', PARAM_INT);

        $mform->addElement('hidden', 'returnurl');
        $mform->setType('returnurl', PARAM_LOCALURL);

        $mform->addElement('hidden', 'scrollpos');
        $mform->setType('scrollpos', PARAM_INT);

        $mform->addElement('hidden', 'appendqnumstring');
        $mform->setType('appendqnumstring', PARAM_ALPHA);
    }
162703
public function addDenyIfRule($field, $value, $operator = '==', $crud = DELETERULES)
    {
        // if an existing rule is detected, over write
        $this->rules[rand(1, 99999)] = new DenyIfRule($field, $value, $operator, $crud);
    }
62690
public function hidden($name, $value = null, $options = [])
    {
        return $this->form->hidden($name, $value, $options);
    }
555747
protected function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setRequired([
            'content',
            'relation_field',
        ]);

        $resolver->setAllowedTypes('content', SiteContent::class);
        $resolver->setAllowedTypes('relation_field', ['string', 'array']);
        $resolver->setAllowedValues(
            'relation_field',
            function ($fields) {
                if (!is_array($fields)) {
                    return true;
                }

                foreach ($fields as $field) {
                    if (!is_string($field)) {
                        return false;
                    }
                }

                return true;
            }
        );

        $resolver->setDefined('exclude_self');
        $resolver->setAllowedTypes('exclude_self', ['bool']);
        $resolver->setDefaults([
            'exclude_self' => true,
        ]);
    }
600333
private function findHiddenField($field)
    {
        $node = $this->getSession()->getPage()->find(
            'xpath',
            strtr(
                ".//input[./@type = 'hidden'][(./@id = '%locator%' or ./@name = '%locator%')]",
                array('%locator%' => $field)
            )
        );
        if (null === $node) {
            throw new ElementNotFoundException($this->getSession(), 'hidden field', 'id|name', $field);
        }

        return $node;
    }
622597
protected static function field_hidden( $name, $value = null, $options = null ) {

		$form_field_type = self::$field_type;

		ob_start();

		pods_view( PODS_DIR . 'ui/fields/_hidden.php', compact( array_keys( get_defined_vars() ) ) );

		$output = ob_get_clean();

		return apply_filters( 'pods_form_ui_field_hidden', $output, $name, $value, $options );
	}
1159548
public function hidden(Form\Element\Hidden $element)
    {
        $html = html('input', $element->getAttributes());
        return $html;
    }
70741
public function configureOptionsResolver(OptionsResolver $resolver)
    {
        parent::configureOptionsResolver($resolver);
        $resolver->setDefaults([
            self::OPTION_DELIMITER => ',',
            self::OPTION_ENCLOSURE => '"',
            self::OPTION_ESCAPE_CHAR => '\\',
            self::OPTION_MAX_LENGTH => 1000,
            self::OPTION_STOP_ON_EOF => false,
        ]);

        $resolver->setRequired([
            self::OPTION_PATH,
            self::OPTION_METHOD,
        ]);

        $resolver->setAllowedTypes(self::OPTION_PATH, ['string']);
        $resolver->setAllowedTypes(self::OPTION_DELIMITER, ['string']);
        $resolver->setAllowedTypes(self::OPTION_ENCLOSURE, ['string']);
        $resolver->setAllowedTypes(self::OPTION_ESCAPE_CHAR, ['string']);
        $resolver->setAllowedTypes(self::OPTION_METHOD, ['string']);
        $resolver->setAllowedTypes(self::OPTION_STOP_ON_EOF, ['bool']);
    }
999935
protected function hideParameters($data, $hidden)
    {
        foreach ($hidden as $parameter) {
            if (Arr::get($data, $parameter)) {
                Arr::set($data, $parameter, '********');
            }
        }

        return $data;
    }
177009
public static function hidden($field, $value = null, array $attributes = array())
	{
		return static::$instance->hidden($field, $value, $attributes);
	}
1058596
private function extractHiddens(&$controls, array $hiddens = null)
    {
        if (!empty($hiddens)) {
            $dom   = new \DOMDocument('1.0');
            $nodes = [];
            foreach ($hiddens as $hidden) {
                $dom->loadHTML($hidden);
                $nodes = $dom->getElementsByTagName('input');
            }
            foreach ($nodes as $node) {
                $controls[$node->getAttribute('name')] = $node->getAttribute('value');
            }
        }
    }