Quantcast

Null - Validation Problem with valid data input

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Null - Validation Problem with valid data input

flash
Hi

After, installing, testing  and finishing basic concepts on grails I've start  to develop MyFirst grails App.
(Using Grails 2.0.3 under Linux or windows) . same problem
The problem is.
y created a Domain .

grails> create-domain-class cl.da.Users
| Created file grails-app/domain/cl/da/Users.groovy
| Created file test/unit/cl/da/UsersTests.groovy

Then I let the Domain class file with this information.
===============Users.groovy======================
package cl.da

class Users {

    Date lastCreated
    Date lastUpdated
    BigInteger credito
    String Nombre
    String Apellido


    static constraints = {
    }
}
=====================================

grails> generate-controller cl.da.Users

| Compiling 2 source files...
| Compiling 2 source files...
| Finished generation for domain class cl.da.Users

grails> generate-views cl.da.Users      generate-views cl.da
| Compiling 1 source files....
| Finished generation for domain class cl.da.Users
grails> run-app.

After testing the form new users, even every field is completed with String or numbers appears the following error.


    Property [apellido] of class [class cl.da.Users] cannot be null
    Property [nombre] of class [class cl.da.Users] cannot be null


If somebody knows how to solve it please post any help

Thanks in advance
Guillermo
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Null - Validation Problem with valid data input

Jonathan Andrew Ong
Try using small letters in your domain properties. String apellido

Sent from my iPhone

On Jun 22, 2012, at 22:36, flash <[hidden email]> wrote:

> Hi
>
> After, installing, testing  and finishing basic concepts on grails I've
> start  to develop MyFirst grails App.
> (Using Grails 2.0.3 under Linux or windows) . same problem
> The problem is.
> y created a Domain .
>
> grails> create-domain-class cl.da.Users
> | Created file grails-app/domain/cl/da/Users.groovy
> | Created file test/unit/cl/da/UsersTests.groovy
>
> Then I let the Domain class file with this information.
> ===============Users.groovy======================
> package cl.da
>
> class Users {
>
>    Date lastCreated
>    Date lastUpdated
>    BigInteger credito
>    String Nombre
>    String Apellido
>
>
>    static constraints = {
>    }
> }
> =====================================
>
> grails> generate-controller cl.da.Users
>
> | Compiling 2 source files...
> | Compiling 2 source files...
> | Finished generation for domain class cl.da.Users
>
> grails> generate-views cl.da.Users      generate-views cl.da
> | Compiling 1 source files....
> | Finished generation for domain class cl.da.Users
> grails> run-app.
>
> After testing the form new users, even every field is completed with String
> or numbers appears the following error.
>
>
>    Property [apellido] of class [class cl.da.Users] cannot be null
>    Property [nombre] of class [class cl.da.Users] cannot be null
>
>
> If somebody knows how to solve it please post any help
>
> Thanks in advance
> Guillermo
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/Null-Validation-Problem-with-valid-data-input-tp4630556.html
> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Null - Validation Problem with valid data input SOLVED

flash
Thanks
IT WORKS!!!!
Loading...