private bool validateAll() { bool namaPasien = Kenko.fieldRequired(txtNamaPasien.Text, lblNamaPasien); bool alamat = Kenko.fieldRequired(txtAlamat.Text, lblAlamat); bool noTelp = Kenko.fieldMin(txtNoTelp.Text, lblNoTelp, 11); bool tglLahir = Kenko.dateRequired(txtTglLahir, lblTgl); bool jenkel = Kenko.toggleRequired(lblJenkel, (bool)rdLaki.IsChecked, (bool)rdPerempuan.IsChecked); if (namaPasien && alamat && noTelp && tglLahir && jenkel) { return(true); } else { return(false); } }
private void txtNoTelp_TextChanged(object sender, TextChangedEventArgs e) { Kenko.fieldMin(txtNoTelp.Text, lblNoTelp, 11); }