Form validation is eazy with HTML and CSS. Don't forget to like and subscribe to the channel to continuously update interesting videos about programming and web design 😍
@manthankanani1883 ай бұрын
Extend this with html attr pattern and boom!!
@lundeveloper3 ай бұрын
With just over 10 lines of CSS, we can validate the form easily and beautifully
@anuvabkumarrit46693 ай бұрын
Not possible for complex I suppose, like those with options and specific regular expression
@dmitrybelov57033 ай бұрын
How about :user-invalid / :user-valid? More suitable pseudo
@gmarsenopoulos3 ай бұрын
Amazing video!! My answer: If you put :not(placeholder-shown) then the button would be disabled only when the user enters invalid data in the inputs. Without it, you can disable the button from the start if any of the input fields are invalid.
@lazy-hero.Ай бұрын
Yep your right 👍🤍
@lundeveloper3 ай бұрын
Topic for next video: What neither Grid nor Flex CSS can do? Subscribe to be the first to see it 😍 ✅✅
@egadirgaa3 ай бұрын
i love how you make html and css look so awesome
@mateod7003 ай бұрын
i love this sound effects throught your videos
@lundeveloper3 ай бұрын
Thanks bro 😍
@jeandearme322 ай бұрын
I hate them, annoying after a while
@freakfreak786Ай бұрын
@@jeandearme32 no
@hameeeed59923 ай бұрын
Great video.
@lundeveloper3 ай бұрын
First comment 😍
@utsavjaiswal0073 ай бұрын
Because we want button should be disabled by default. When user enters correct data then it should be enabled. BTW I love your content... The way you showed the power of html and css... 🔥
@HuynhLuong2272 ай бұрын
wow, pro tips, thanks for sharing
@MarkupMaverick3 ай бұрын
Great video.👍Consider using the pseudo classes :user-valid and :user-invalid, that will make the placeholder trick obsolete.🙂
@lundeveloper3 ай бұрын
Thank you bro, but The reason I haven't been introduced to :user-valid in this video is because many browsers are not yet supported so it cannot be used in real projects.
@drumlinbeatpaulАй бұрын
Great video, thank you. Simple and does just what I need.
@muhammadadnanrazaqadri3 ай бұрын
You are Great Bro Thanks for this Type Of Content Please Continue making this type of video
@freakfreak786Ай бұрын
I love how you admire simplicity. For me, that makes you a top tier channel
@glennwarindu45803 ай бұрын
BRO😱😱😱I marvellled once I came accross your channel you are a genius thank GOD for you
@tolgaflashtr28553 ай бұрын
That's an awesome trick 💯💯
@social_klauts2 ай бұрын
I Love your Videos. Great Work.
@roshanaslam74803 ай бұрын
Great video keep it up
@philathea2 ай бұрын
From the way you present your videos it's like you will be good movie script writer or game developer, you damn good ❤
@sol____-_-3 ай бұрын
Nice.
@luisdavidmartinezfundora82243 ай бұрын
This is just amazing ❤
@keshav2kumar3 ай бұрын
Very nice
@thezaidushaikh3 ай бұрын
Your Content is next level
@redswordz91313 ай бұрын
this is very handy! i didn't know 'required' existed in html! really good and straightforward as always.
@SwitchSwift123 ай бұрын
Amazing content 😊
@vanshchauhan53403 ай бұрын
100k soon ❤
@PicSta3 ай бұрын
Man, another great video with awesome, easy and entertaining valuable content. Thanks for your good work again. Have a nice day, Hoangho!
@lundeveloper3 ай бұрын
Thank you brother
@franckngoubounkou99303 ай бұрын
You are very dangerous .High level .
@georgikyshenko43803 ай бұрын
This channel is gold!
@lundeveloper3 ай бұрын
Thanks bro 😘
@angryllamaa3 ай бұрын
Now i can flex my skills to my friends
@DavideMaiolo3 ай бұрын
Love that trick with the placeholder shown ! didnt know this is possible :D I guess we dont want that on the submit button since the submit button should also be shown as disabled no matter if the placeholder is shown or not. We only want to loose the disabled look once all inputs are valid
@emmaeli-m2u3 ай бұрын
G.O.A.T. [greatestOfAllTime]
@MustaPha-s4i3 ай бұрын
The best i love your vidéo
@lundeveloper3 ай бұрын
😍😍😍😍 Thanks for watching my content ❤️
@besuccessfull18913 ай бұрын
Your designs are beautiful please make a video for that tooo, how do you choose the design plzz a make a video on design course🙏🙏
@tanvirkabir473 ай бұрын
Just wow 🤯
@lundeveloper3 ай бұрын
Thank you brother 🤤🤤🤤
@amitmallick49153 ай бұрын
I have been watching your videos since you started the channel. Your channel is a real gem. I kindly request that you make a complete multifunctional website using only HTML and CSS.
@lundeveloper3 ай бұрын
Thank you very much, I will keep trying
@jayvee-officialАй бұрын
hey.. I thought it might be useful for my project 👍
@LuffyD-u7l3 ай бұрын
Nice
@okforcoding3 ай бұрын
Great video bro ❤
@lundeveloper3 ай бұрын
Thank you for watching my content brother ❤️
@peterbaerts3 ай бұрын
Nice video Small hint, with the pattern and title Attributes, any regular expression can be used to validate input. 😊
@AirmanCS3 ай бұрын
First I love this channel, second pls do a image comparison only using CSS that looks nice like the java query input event ones, if not clear the ones that have like a line in the middle and you move it to see 2 images one on top of each other, also I would love if you consider using your real voice even if it is the thickest of accents ever, if it is hard I would add some subs but there is something about the AI voice that throws me off a bit 😅
@YINREX-243 ай бұрын
bro you are great
@lundeveloper3 ай бұрын
Thank you bro
@Anonymous349583 ай бұрын
Thanks for the awesome video. Please try to make some js videos too
@kodeeshwarar23013 ай бұрын
I love this Simple hacks
@lundeveloper3 ай бұрын
😍
@andphysics43183 ай бұрын
please make a series of backend programming I want to learn this from you.
@lundeveloper3 ай бұрын
I Will
@andphysics43183 ай бұрын
@@lundeveloper thank you master , I'll be waiting for the series
@denizorsel10293 ай бұрын
I like the effort you put into this video but doing form validation with html and css only makes sense for simple forms like a login interface. Let's say you want to do it on a survey form with conditions, quotas, loops and there it immediately stops making sense to push the logic on css but drive it on a platform with a focus (eg. formik etc..) Yes we would still display styled outcomes through css but the logic needs to stay in js sphere.
@jerickojamestano6263 ай бұрын
thanks
@mr.masolov1611Ай бұрын
Great idea, but has a HUGE flaw called "insect element"
@johnlloydtenido69153 ай бұрын
IMO.This is more complicated than using javascript :D
@yourherper3 ай бұрын
I love your channel, tell me how many years you spend with css and html?
@lundeveloper3 ай бұрын
Thank you very much, even though this channel has just been established, please believe in the content I share. I learned to code HTML & CSS when I was 13 years old (2010)
@AlexCernatАй бұрын
better is to use :user-valid and :user-invalid; they aren't new anymore, so the support is great now!
@treshi3 ай бұрын
Answer: Because you're changing the button relative to the input:invalid which doesn't require you to specify :not since you're not changing anything on the input field and the button only needs to know if the field is valid or invalid. (I guess )
@tibba692 ай бұрын
In a form with failed validation, how can I block the submit button if it is BEFORE all the inputs? You only show when submit button is after all inputs. Great video by the way.
@BliitzPint2 ай бұрын
Answer: Because it's not necessary ;) When it's valid, it's valid :) And only then we care. Nice trick by the way. Is "placeholder-shown" widely supported by the browsers? How about working with ":has". Would that make it even easier?
@DeepJasoliya3 ай бұрын
Because we only want enable submit button when inputs are completely valid
@JanMitLuca3 ай бұрын
Answer: Because we want the button to be only clickable once all required inputs are valid. Empty inputs are invalid as shown in the video.
@king828233 ай бұрын
1:45 how to quick select every props 😲
@FullStack-s8g3 ай бұрын
Bro use user-valid instead of valid same for invalid 😊
@ionsula1413 ай бұрын
The shopping cart script you did before was very good. Can I add product size option?
@lundeveloper3 ай бұрын
Yes You Can 😍
@ionsula1413 ай бұрын
@@lundeveloper Hi there. can you please add this function for me? I would pay you a fee for this. I have email you with detail
@DinahLang-y4g3 ай бұрын
@@lundeveloper Hi I mailed you with detail. thanks
@mattdaus57153 ай бұрын
This is an oversimplification of most form validation. It's considered best practice not to disable the submit button but allow users to fail and tell them why their submission was invalid. Something not possible with CSS unless you have some very specific CSS selectors, even then there's accessibility to take into account but based on the colors in the design it looks like that wasn't a consideration for this client. I think there is a use for simple validation like this but for complex sites or apps this usually won't cut it.
@roshplays21Ай бұрын
HWY HWY can u teach us how u made that background please
@muhammadadnanrazaqadri3 ай бұрын
Please Make Video On Switching Dark To Light or Light to dark mode using HTML CSS ONLY (without JS or any other language)
@lundeveloper3 ай бұрын
Of course you can, but if you only use HTML and CSS you won't be able to remember the last option the user chose. If that's not important to you, everything will be very easy
@muhammadadnanrazaqadri3 ай бұрын
@@lundeveloper ok then can you make a course for js
@gandhirajs70553 ай бұрын
because when you focus the button placeholder is gone and button turn into normal state and what happen when you enter the page what will be the submit button pointer event is none or auto?
@alin72953 ай бұрын
My Answer: You have not used the :not(:placeholder-shown) for the button as the written style will only be applied whenever the user writes something in the input . My Suggestion for other viewers: It(using :not(:placeholder-shown)) can also be useful in different cases. It helps us to create a default custom style of the button,e.g., to set the default color not to be red
@awaken-trigger3 ай бұрын
Is there any way to get data of gmail and numbers etc.. of users with only html, css without no backend. 😢 Help..... please
@Aguinaldowagas3 ай бұрын
if submit is input ? add (:placeholder-shown) : false;
@_u_nknownuser3 ай бұрын
explain plss
@mohdamir914Ай бұрын
You didn't use input with placeholder in last line of code in css because we already checked the validation while typing and now its successfully filled so just need to check if it is valid or not. Correct?
@joel-rg8xm3 ай бұрын
Uhmm :not(:placeholder-shown) ... ¿Because we want to disable the button all the time (when the text inputs are empty and when they are invalid as well)?
@nirban76893 ай бұрын
Not add placeholder shown property at last because first time when user not enter any data submit button looks kind of disable
@PLAGUEDOCTOR-282 ай бұрын
I need a tutorial to make login page pls
@roydeljoseph3 ай бұрын
This is amazing... But not gonna lie...LOW-KEY I feel bro got it out for javascript....like he finna prove it nah all that and he can do the same with CSS
@wtf_vish3 ай бұрын
hey bro, can you make a front-end website as a reference as i have hackathon in about 10 days. Please use html and css only.
@psenej3 ай бұрын
what about tailwind css ?
@UAP_Clips3 ай бұрын
because you need the button to be active after the placeholder is not shown
@requenz_3 ай бұрын
It looks good, but the HTML code can be removed if you open the Devtools by pressing F12.
@lundeveloper3 ай бұрын
That's right, like I said at the beginning of the video. When users want to cheat, Devtools can help them pass validation not only for HTML but also for Javascript
@requenz_3 ай бұрын
@@lundeveloper What about PHP?
@PicSta3 ай бұрын
@@requenz_ PHP is a server sided validation. Validation with PHP is a must, before you write data to your database. Like prevent from SQL injection or any other vulnerable content.
@codeSlay-yv4wq2 ай бұрын
Bro where do you find those background images
@jeandearme322 ай бұрын
I like the content, but those musical sounds are absolutely irritating
@lundeveloper2 ай бұрын
Thanks for your feedback, I'm adjusting it.
@wordspace1213 ай бұрын
Just a quick question You validated password with minlength attribute Wouldn't it be risky if someone goes to inspect element and change that attribute value?
@aluexpress9873 ай бұрын
Last question why you don't need not:placeholderShown because button tag has no placeholder.
@PicSta3 ай бұрын
A button has no placeholder shown state. Initially, we want the button only be active, when all fields are validated as correct.
@flash27s3 ай бұрын
Sir, can you please tell me, which theme of vs code are you using in this video?
@lundeveloper3 ай бұрын
@@flash27s This is a custom theme, you will find a video about it in the description of this video.
@Rodrigo-nx4fg3 ай бұрын
Bro, the fart sound makes me happier 😂
@lundeveloper3 ай бұрын
hahaa
@madhavanj9983 ай бұрын
How to change the text "please fill this field"
@nobie-art3 ай бұрын
Can't the validation issue before the user enters anything be easily fixed by using user-valid and user-invalid?
@lundeveloper3 ай бұрын
Yes, using user-valid would be much simpler, however there are still too many browsers that do not support user-valid. So it is not recommended to use user-valid in real projects.
@lucadetomi92693 ай бұрын
Why not use ":user-invalid" instead of the more complex concatenated selector?
@Crix-X9823 ай бұрын
Plz awnser your own question Because i want to know
@DavideMaiolo3 ай бұрын
I guess we dont want that on the submit button since the submit button should also be shown as disabled no matter if the placeholder is shown or not. We only want to loose the disabled look once all inputs are valid
@Crix-X9823 ай бұрын
Bro I was comented that why we not use :not(placeholder-shown) Then you asked this question 😅
@lundeveloper3 ай бұрын
😅😅 Please wait a moment, I believe someone will reply soon. 😍
@masar-atАй бұрын
VS Code theme name?
@MithilaChiranjeewa3 ай бұрын
Bro what is your vs code them name?
@lundeveloper3 ай бұрын
This is a custom theme by me. You will find information about it in the description of this video
@NehaV-ly5hk3 ай бұрын
Which theme are you using in VS code?
@lundeveloper3 ай бұрын
You can find it in description this video
@Nodsaibot3 ай бұрын
sudden chello cords gives us anxiety lol bye
@_MrThii3 ай бұрын
Can you activate subtitles
@lundeveloper3 ай бұрын
It is being processed
@h3llloworld2 ай бұрын
because a button doesn't have a placeholder
@Impact_TO3 ай бұрын
The sounds 😭😭😭 i cant
@lundeveloper3 ай бұрын
is it bad?
@Impact_TO3 ай бұрын
@@lundeveloper no i love it. Fart sounds will never not make me laugh
@KsaR-993 ай бұрын
But you know, "a@a" is valid e-mail in html?
@thelfensdrfer3 ай бұрын
Because it is a valid email.
@KsaR-993 ай бұрын
@thelfensdrfer Technically yes, in practice no. All the (public) e-mail addresses requires an TLD e.g. ".com", ".net" etc. at the end. So this isn't valid public e-mail.
@thelfensdrfer3 ай бұрын
@@KsaR-99 why does it have to be public?
@KsaR-993 ай бұрын
@@thelfensdrfer Let's say it's register form, newsletter or soever. You want public address to send verification code on correct address, or deliver newsletter. And this tutorial seems to aim web-development (and not localhost). So in short "a@a" will work on "local host" but not on -- public pages; In that case (It's not security because it is easy to workaround) to improve "required" attribute can be used in conjunction with the pattern="" attribute.
@thelfensdrfer3 ай бұрын
@@KsaR-99 there are more networks than localhost and the public internet. Intranets, company networks, etc.
@bw-dude3 ай бұрын
Had to quit after 30 seconds, that silly AI-voice and the absolutely annoying sound effects make it unwatchable for me. Why do you ruin good content with that?
@DanSmith-ku3wn3 ай бұрын
Nice videos, but oh man these sound effects... Totally random and not classy. Please stop :(
@PaulAllsopp-rh5gb28 күн бұрын
How funny! Try validating an email address without JS now that the HTML5 email type was basically abandoned. Now HTML5 says user@server is a valid email, and even adding a pattern doesn't work. You have to use JS, period.
@choujiakimichi3 ай бұрын
No thank you...Dev tools can easily remove all forms of security from the form 😞😞😞