grails-validation Questions
3
Solved
I am looking for a way to validate IP addresses in Grails via constraints.
Is something like this possible?
package example
class Ip {
String ip
static constraints = {
ip(unique: true, inet...
Shimmery asked 10/7, 2013 at 11:56
2
Solved
I cannot render the errors from my command object. It does the job well but my .gsp view does not render the errors I raise.
Here is my controller action:
def handleModifyProfile2 = { CreditProv...
Womanhood asked 16/8, 2011 at 14:35
2
Solved
Does anybody know how I could get the fieldError to print out in the example below.
for each item with an error, I would like to print custom error messages that I have defined in the messages.pro...
Kumamoto asked 16/7, 2010 at 10:57
3
Solved
I have an issue where my domain class has two potential mutually exclusive external keys, either a serial number or a legacy lookup value.
Since I'm not sure which one I'll have for any given entr...
Orthodontist asked 14/7, 2012 at 4:20
2
Solved
I have a Person object with a lastName field. The lastName field cannot be blank. When the user submits a form blank value in the lastName field, the error message that the user sees is:
Property ...
Damon asked 7/2, 2011 at 14:48
5
Solved
I am currently trying to specify custom error messages in grails for the default constraints but so far all I get back is the default error message.
I know that I have to edit the grails-app/i18n/...
Ethnomusicology asked 14/7, 2010 at 21:25
3
Solved
I'm using grails 2.2.1 and attempting to validate a nested command structure. Here is a simplified version of my command objects:
@Validateable
class SurveyCommand {
SectionCommand useful
Secti...
Aspergillus asked 24/4, 2013 at 0:50
4
The following code will throw a grails.validation.ValidationException if the save fails for some reason. But the result is a generic error. How can I know the actual cause of the error so I can rep...
Thar asked 28/10, 2009 at 22:55
2
Solved
When using command objects like:
class UserCommand {
String name
static constraints = {
name blank: false, unique: true, minSize: 3
}
}
you can use them to validate objects without making...
Whiney asked 10/6, 2013 at 20:18
2
Solved
I have a form to create a place. Depending of the country, the province (state, region) field is required or not.
When is not required, I want to be null, not empty string. I have code that makes ...
Muenster asked 29/5, 2012 at 8:21
1
Solved
Suppose a simple Grails domain class:
class Account {
String countryId;
String userName;
String password;
static constraints = {
...???...
}
}
It is required that user names are unique ...
Encipher asked 28/9, 2011 at 12:44
2
Normally for a Grails domain or command class, you declare your constraints and the framework adds a validate() method that checks whether each of these constraints is valid for the current instanc...
Orr asked 10/4, 2011 at 17:23
2
Solved
I have a domain class that needs to have a date after the day it is created in one of its fields.
class myClass {
Date startDate
String iAmGonnaChangeThisInSeveralDays
static constraints = {
i...
Catamnesis asked 9/5, 2011 at 21:43
1
Solved
This question comes from the problem of another question of mine. In that question, I come across a situation that hasErrors() function doesn't work for non-persistent domain class, even after all ...
Varico asked 28/12, 2010 at 8:4
2
Solved
I followed the instruction here: http://www.grails.org/doc/latest/guide/7.%20Validation.html
and added into config.groovy:
grails.validateable.classes = [liningtest.Warm']
Then added in src/gro...
Floccule asked 15/12, 2010 at 9:45
1
Solved
I am a newbie in grails and groovy. I have a Project domain-class with start and end date. I want to put in a constraint specifying that the end date needs to be greater than the start date(and the...
Harrisharrisburg asked 2/11, 2010 at 18:58
2
Solved
I need to write Domain class constraint in Grails which says that one integer field must be greater or equal than the other.
When I write the code like this:
class MyDomain {
String title
int ...
Torn asked 8/1, 2010 at 13:28
2
In my grails app I have an outer command object that contains a list of other command objects:
public class OuterCommand {
List<InnerCommand> innerCommands = ListUtils.lazyList([], Factory...
Infrequency asked 9/12, 2009 at 18:7
2
How do you (if you) manage client side validation with grails ? Do you use a plugin or do you mirror your constraints using a javascript framework ?
Cheers
Army asked 26/11, 2009 at 23:16
1
I'm trying to get grails to validate the contents of a List of objects, might be easier if I show the code first:
class Item {
Contact recipient = new Contact()
List extraRecipients = []
stat...
Abnegate asked 24/6, 2009 at 19:54
1
© 2022 - 2024 — McMap. All rights reserved.