title: ColdFusion: server-side user validations
body: <p>Is there some way to improve these server-side user fields validations?</p>
  
  <pre><code>&lt;cfif Form.LoginName EQ ""&gt;&lt;h1&gt;Login Name is required.&lt;/h1&gt;&lt;/cfif&gt;
  &lt;cfif Form.Password EQ ""&gt;&lt;h1&gt;Password is required.&lt;/h1&gt;&lt;/cfif&gt;
  &lt;cfif Form.Password NEQ Form.PasswordConfirmation&gt;&lt;h1&gt;Password confirmation does not match Password.&lt;/h1&gt;&lt;/cfif&gt;
  &lt;cfif Form.FirstName EQ ""&gt;&lt;h1&gt;First Name is required.&lt;/h1&gt;&lt;/cfif&gt;
  &lt;cfif Form.LastName EQ ""&gt;&lt;h1&gt;Last Name is required.&lt;/h1&gt;&lt;/cfif&gt;
  
  &lt;cfif Form.LoginName EQ "" OR Form.Password EQ "" OR Form.Password NEQ Form.PasswordConfirmation OR Form.FirstName EQ "" OR Form.LastName EQ ""&gt;
      &lt;p&gt;User has not been created&lt;/p&gt;
      &lt;p&gt;You can use your browser's back button to keep form fields filled and try again.&lt;/p&gt;
      &lt;p&gt;&lt;a href="users.cfm"&gt;Return to users list&lt;/a&gt;.&lt;/p&gt;
      &lt;cfabort&gt;
  &lt;/cfif&gt;
  </code></pre>