is there a way to check is URL sent in request complete. For example, I want to store in my database only links which are complete (with protocol) like:
https://google.com
and if a user is sending a link without this protocol https://
I want to merge it automatically and if it is there I don't want to add it one more time. For example, if the user is really sending in request full link and code add it automatically one more time it would be like https://https://google.com
Currently, I have this part where I add protocol but I don't have the part where I am checking is the protocol there.
...
protected function prepareForValidation()
{
if(!empty($this->site_facebook))
{
$this->merge(['site_facebook' => 'https://' . $this->site_facebook]);
}
...