Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

🍦 Nice little addition to a Laravel validation error: scroll your users back up to the error...

42,746 görüntüleme • 2 yıl önce •via X (Twitter)

11 Yorum

Logan Craft profil fotoğrafı
Logan Craft2 yıl önce

What if the error is at the bottom of the form? Maybe better to have some JavaScript that looks for the first error in the list by targeting the form then getting the first element with .error class or something…

Caleb Porzio profil fotoğrafı
Caleb Porzio2 yıl önce

Yeah, I toyed with that too: x-init="$el.closest('form').querySelector('[aria-invalid=\'true\']').closest('label').scrollIntoView()" Kind of a mouth-full lol, but works great

Tuginho profil fotoğrafı
Tuginho2 yıl önce

Great for UX!

Swan Company Inc profil fotoğrafı
Swan Company Inc2 yıl önce

Your making life too easy for people like me but I'll take it! Honestly, I can't wait to show what I've been building with the TALL stack and the day it's profitable I'll be giving back as much as I can for everyone's hard work.

𝕽𝖎𝖉𝖜𝖆𝖓𝖚𝖑𝖑𝖆𝖍🥰 profil fotoğrafı
𝕽𝖎𝖉𝖜𝖆𝖓𝖚𝖑𝖑𝖆𝖍🥰2 yıl önce

Cool stuff, Caleb🥰

Ryan Bilesky profil fotoğrafı
Ryan Bilesky2 yıl önce

Why can't more apps do this? With how many times I click submit and get an error but don't know it because it's up at the top where am already scrolled passed and take a second to realize what's going on, I can only imagine how normal users must feel.

Λlex Wulf profil fotoğrafı
Λlex Wulf2 yıl önce

@filamentphp also supported by you?

Ifeanyichukwu John profil fotoğrafı
Ifeanyichukwu John2 yıl önce

Well done @calebporzio

Amit Mandaviya🇮🇳 | Full Stack| React JS| Laravel profil fotoğrafı
Amit Mandaviya🇮🇳 | Full Stack| React JS| Laravel2 yıl önce

@PovilasKorop That's literally what mostly we need when we have long forms.

Vincent Uche profil fotoğrafı
Vincent Uche2 yıl önce

Cool. What about a smooth scroll?

Caleb Porzio profil fotoğrafı
Caleb Porzio2 yıl önce

Pretty easy to add!

Benzer Videolar