Packageorg.granite.validation
Interfacepublic interface IMessageInterpolator
ImplementorsDefaultMessageInterpolator

Interpolate a given constraint violation message. Implementations should be as tolerant as possible on syntax errors.



Public Methods
 MethodDefined by
  
interpolate(messageTemplate:String, constraint:IConstraint, value:String, locale:* = null):String
Interpolate the message template based on the contraint validation context.
IMessageInterpolator
Method detail
interpolate()method
public function interpolate(messageTemplate:String, constraint:IConstraint, value:String, locale:* = null):String

Interpolate the message template based on the contraint validation context. The locale is defaulted according to the IMessageInterpolator implementation or may be passed as a parameter.

Parameters
messageTemplate:String — the message to interpolate.
 
constraint:IConstraint — the constraint related to the interpolation.
 
value:String — the invalid value (according to the current constraint).
 
locale:* (default = null) — an optional locale used for message localization.

Returns
String — the interpolated error message.