Thuta Learning
ရှာဖွေရန်
IntermediateWeb Developmentbeginner

Labels & Validation

စိတ်လျှော့ပါ။ ဒီခန်းကို စာအုပ်လိုမဟုတ်ဘဲ စကားပြောသလိုပဲ၊ နားလည်လွယ်အောင် ရှင်းပါမယ်။

Form မှာ label, required, minlength, pattern စတဲ့ validation attributes တွေထည့်ပေးရင် user input quality ပိုကောင်းပါတယ်။ Label မပါတဲ့ input က “နာမည်မပါတဲ့ခလုတ်” လိုပါ — ဘာလုပ်ရမှန်းမသိစေပါဘူး။

html
<form>
  <label for="email">Email address</label>
  <input id="email" name="email" type="email" required>

  <label for="password">Password</label>
  <input id="password" name="password" type="password" minlength="8" required>

  <button type="submit">Create account</button>
</form>
You should see
Browser က email format, required field, password length တွေကို basic စစ်ပေးပါမယ်။
Labels & Validation | Thuta Learning