PDA

View Full Version : [FIXED] [V0.6] Validation broken SVN (0.6)



Timothy
Aug 19, 2008, 11:06 AM
Hello,

Validation appears to be broken in SVN release, especially with the use of masterpages:

Login.master:



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/tr/xhtml11/dtd/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Example</title>
</head>
<body>
<form runat="server">
<asp:ScriptManager runat="server" EnablePartialRendering="True" />
<ExtJS:ScriptManager runat="server" StateProvider="PostBack" Theme="Gray" />
<asp:ContentPlaceHolder ID="Content" runat="server" />
</form>
</body>
</html>


Login.aspx:


<%@ Page Language="C#" MasterPageFile="Login.master" %>
<script runat="server">
protected void btnLogin_Click(object sender, EventArgs e)
{
if (Page.IsValid)
{

}
}
</script>
<asp:Content runat="server" ContentPlaceHolderID="Content">
<ExtJS:TextField ID="txtUserName" runat="server" MaxLength="255" Width="235" />
<asp:RequiredFieldValidator runat="server" ControlToValidate="txtUserName" ValidationGroup="vsLogin" Display="Dynamic">!</asp:RequiredFieldValidator>
<ExtJS:TextField ID="txtPassword" runat="server" InputType="Password" MaxLength="255" Width="235" />
<asp:RequiredFieldValidator runat="server" ControlToValidate="txtUserName" ValidationGroup="vsLogin" Display="Dynamic">!</asp:RequiredFieldValidator>
<ExtJS:Button ID="btnLogin" runat="server" CausesValidation="True" ValidationGroup="vsLogin" &#111;nclick="btnLogin_Click" Text="Login" />
</asp:Content>


Failure scenario fill out username and password, click login and it clears the fields and validation returns empty.

Success scenario remove master page.

I can't login to my application anymore ;)

Cheers,
Timothy

geoffrey.mcgill
Aug 19, 2008, 2:25 PM
I'm looking into this right now.

Did the client-side validation work previously? or, just server-side?

Timothy
Aug 19, 2008, 2:47 PM
I've never had client-side validation working, it appears to always postback.

Cheers,
Timothy

geoffrey.mcgill
Aug 19, 2008, 3:26 PM
I have the server-side validation working again. We made a pretty fundamental change to how most of the form controls were being rendered and you found this bug before we had a chance to fully test.

The code in the /trunk/ is going through major changes right now, so expect things might break, until we hit the Preview release of v0.6. Although, if you find a problem//bug, please let us know and we'll fix immediately.

I'm just going to try to get client-side validation working before committing revisions.

geoffrey.mcgill
Aug 25, 2008, 3:18 PM
The validation is working again.

I also did some work with triggering the client-side validation of <asp> Validator controls and it should also work now. I still want to do some more testing, but the basic examples I tried all worked.

Please ensure you clear your browser cache after an SVN update.

Hope this helps.

Timothy
Aug 25, 2008, 3:30 PM
I've noted it working as of revision 240 Thursday August 21st when I actually checked :)

Cheers,
Timothy

geoffrey.mcgill
Aug 25, 2008, 5:25 PM
Ya, there server-side validation was working a while back, although only just recently did the client-side validation also fire properly.