Forms
phil/url-bundleTypedUrlType is one text field, to and from a TypedUrl: the kind of the address is detected among the types
it accepts.
$builder->add('social', TypedUrlType::class, ['types' => [KnownUrlType::Facebook, KnownUrlType::Instagram]]);
- It extends Symfony's
UrlType, withhttpsas the default protocol:instagram.com/shopis read ashttps://instagram.com/shop. - An empty field is
null; an address of no accepted kind makes the field invalid with This address is not one of the accepted kinds.