@CIF annotation
Spanish validation

back to index

Action

(Available since v1.1)
Requires that a value be a valid spanish CIF/NIF/DNI/NIE

Javadoc Ref :  Javadoc reference@CIF

 Input Types 1
CharSequence
 Output Types
Same as input
   

1Automatic conversion will take place if the provided input does not match any of the input classes, as described in the conversions part of the manual.

Arguments

personasFisicas

Whether DNI/NIE/NIFs are allowed (default is true)

personasJuridicas
Whether CIFs are allowed (default is true)
message

Literal message to use if validation fails.

errorCode
Error code to use if validation fails.
messageKey
Message key to use if validation fails.

 

Example

@CIF(personasJuridicas=false)
public String cifPersonas;